diff options
author | Kim Alvefur <zash@zash.se> | 2023-04-02 21:58:53 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-04-02 21:58:53 +0200 |
commit | ade5f403711f58aa07828b8cacfb2c8943f58163 (patch) | |
tree | c0bcd3b9b4c79dada32e14cc46a2860e304e3fce | |
parent | b06dd038cd796b93f9fa7a578ba0f279feb2f2b0 (diff) | |
download | prosody-ade5f403711f58aa07828b8cacfb2c8943f58163.tar.gz prosody-ade5f403711f58aa07828b8cacfb2c8943f58163.zip |
mod_adhoc: Remove "mod_" prefix from permission action name
Other places doesn't have "mod_" there, why should it here?
-rw-r--r-- | plugins/adhoc/adhoc.lib.lua | 4 | ||||
-rw-r--r-- | plugins/adhoc/mod_adhoc.lua | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/adhoc/adhoc.lib.lua b/plugins/adhoc/adhoc.lib.lua index 2d00b778..0ce45e19 100644 --- a/plugins/adhoc/adhoc.lib.lua +++ b/plugins/adhoc/adhoc.lib.lua @@ -27,10 +27,10 @@ function _M.new(name, node, handler, permission) error "the permission mode 'user' has been renamed 'any', please update your code" end if permission == "admin" then - module:default_permission("prosody:admin", "mod_adhoc:"..node); + module:default_permission("prosody:admin", "adhoc:"..node); permission = "check"; elseif permission == "global_admin" then - module:default_permission("prosody:operator", "mod_adhoc:"..node); + module:default_permission("prosody:operator", "adhoc:"..node); permission = "check"; end return { name = name, node = node, handler = handler, cmdtag = _cmdtag, permission = permission }; diff --git a/plugins/adhoc/mod_adhoc.lua b/plugins/adhoc/mod_adhoc.lua index 505579bf..4482682d 100644 --- a/plugins/adhoc/mod_adhoc.lua +++ b/plugins/adhoc/mod_adhoc.lua @@ -15,7 +15,7 @@ local commands = {}; module:add_feature(xmlns_cmd); local function check_permissions(event, node, command) - return (command.permission == "check" and module:may("mod_adhoc:"..node, event)) + return (command.permission == "check" and module:may("adhoc:"..node, event)) or (command.permission == "local_user" and jid_host(event.stanza.attr.from) == module.host) or (command.permission == "any"); end |