From ade5f403711f58aa07828b8cacfb2c8943f58163 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 2 Apr 2023 21:58:53 +0200 Subject: mod_adhoc: Remove "mod_" prefix from permission action name Other places doesn't have "mod_" there, why should it here? --- plugins/adhoc/adhoc.lib.lua | 4 ++-- plugins/adhoc/mod_adhoc.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins') 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 -- cgit v1.2.3