aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-01-23 19:55:32 +0100
committerKim Alvefur <zash@zash.se>2022-01-23 19:55:32 +0100
commit1809c0460f51547c5ee26f37c426cc65352bb886 (patch)
tree7bd13be5f07f670b6516a2f882b031021b355567
parent90215f635bf8fd031d3505d54a88aa0440bea29b (diff)
downloadprosody-1809c0460f51547c5ee26f37c426cc65352bb886.tar.gz
prosody-1809c0460f51547c5ee26f37c426cc65352bb886.zip
mod_admin_shell: Add help section about roles
As in the argument to user:create() and user:roles() Tricky to come up with something sensible to write when Prosody core only knows of the 'prosody:admin' role so far.
-rw-r--r--plugins/mod_admin_shell.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua
index 1f860370..01fef416 100644
--- a/plugins/mod_admin_shell.lua
+++ b/plugins/mod_admin_shell.lua
@@ -216,6 +216,7 @@ function commands.help(session, data)
print [[module - Commands to load/reload/unload modules/plugins]]
print [[host - Commands to activate, deactivate and list virtual hosts]]
print [[user - Commands to create and delete users, and change their passwords]]
+ print [[roles - Show information about user roles]]
print [[muc - Commands to create, list and manage chat rooms]]
print [[server - Uptime, version, shutting down, etc.]]
print [[port - Commands to manage ports the server is listening on]]
@@ -253,6 +254,17 @@ function commands.help(session, data)
print [[user:roles(jid, host, roles) - Set roles for an user (see 'help roles')]]
print [[user:delete(jid) - Permanently remove the specified user account]]
print [[user:list(hostname, pattern) - List users on the specified host, optionally filtering with a pattern]]
+ elseif section == "roles" then
+ print [[Roles may grant access or restrict users from certain operations]]
+ print [[Built-in roles are:]]
+ print [[ prosody:admin - Administrator]]
+ print [[ (empty set) - Normal user]]
+ print [[]]
+ print [[The canonical role format looks like: { ["example:role"] = true }]]
+ print [[For convenience, the following formats are also accepted:]]
+ print [["admin" - short for "prosody:admin", the normal admin status (like the admins config option)]]
+ print [["example:role" - short for {["example:role"]=true}]]
+ print [[{"example:role"} - short for {["example:role"]=true}]]
elseif section == "muc" then
-- TODO `muc:room():foo()` commands
print [[muc:create(roomjid, { config }) - Create the specified MUC room with the given config]]