Software /
code /
prosody
Comparison
plugins/mod_invites_adhoc.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 |
parent | 12977:74b9e05af71e |
child | 13472:d5a9847b0e55 |
comparison
equal
deleted
inserted
replaced
13169:7b6e7290265b | 13170:082c7d856e61 |
---|---|
10 -- Who can see and use the contact invite command. It is strongly recommended to | 10 -- Who can see and use the contact invite command. It is strongly recommended to |
11 -- keep this available to all local users. To allow/disallow invite-registration | 11 -- keep this available to all local users. To allow/disallow invite-registration |
12 -- on the server, use the option above instead. | 12 -- on the server, use the option above instead. |
13 local allow_contact_invites = module:get_option_boolean("allow_contact_invites", true); | 13 local allow_contact_invites = module:get_option_boolean("allow_contact_invites", true); |
14 | 14 |
15 module:default_permission(allow_user_invites and "prosody:user" or "prosody:admin", ":invite-users"); | 15 module:default_permission(allow_user_invites and "prosody:registered" or "prosody:admin", ":invite-users"); |
16 | 16 |
17 local invites; | 17 local invites; |
18 if prosody.shutdown then -- COMPAT hack to detect prosodyctl | 18 if prosody.shutdown then -- COMPAT hack to detect prosodyctl |
19 invites = module:depends("invites"); | 19 invites = module:depends("invites"); |
20 end | 20 end |