Mercurial > prosody-hg
comparison plugins/muc/persistent.lib.lua @ 13170:082c7d856e61
core, plugins: Split prosody:user role into prosody:{guest,registered,member}
This gives us more granular control over different types of user account.
Accounts registered by IBR get assigned prosody:registered by default, while
accounts provisioned by an admin (e.g. via prosodyctl shell) will receive
prosody:member by default.
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 29 Jun 2023 15:36:13 +0100 |
| parents | f731eda8a873 |
| children |
comparison
equal
deleted
inserted
replaced
| 13169:7b6e7290265b | 13170:082c7d856e61 |
|---|---|
| 7 -- COPYING file in the source package for more information. | 7 -- COPYING file in the source package for more information. |
| 8 -- | 8 -- |
| 9 | 9 |
| 10 local restrict_persistent = not module:get_option_boolean("muc_room_allow_persistent", true); | 10 local restrict_persistent = not module:get_option_boolean("muc_room_allow_persistent", true); |
| 11 module:default_permission( | 11 module:default_permission( |
| 12 restrict_persistent and "prosody:admin" or "prosody:user", | 12 restrict_persistent and "prosody:admin" or "prosody:registered", |
| 13 ":create-persistent-room" | 13 ":create-persistent-room" |
| 14 ); | 14 ); |
| 15 | 15 |
| 16 local function get_persistent(room) | 16 local function get_persistent(room) |
| 17 return room._data.persistent; | 17 return room._data.persistent; |
