Changeset

13020:3174308d127e

mod_adhoc: Remove "mod_" prefix from permission action name Other places doesn't have "mod_" there, why should it here?
author Kim Alvefur <zash@zash.se>
date Sun, 02 Apr 2023 21:58:53 +0200
parents 13019:8a2f75e38eb2
children 13023:cbe58f747d48
files plugins/adhoc/adhoc.lib.lua plugins/adhoc/mod_adhoc.lua
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/adhoc/adhoc.lib.lua	Thu Mar 17 17:45:27 2022 +0000
+++ b/plugins/adhoc/adhoc.lib.lua	Sun Apr 02 21:58:53 2023 +0200
@@ -27,10 +27,10 @@
 		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 };
--- a/plugins/adhoc/mod_adhoc.lua	Thu Mar 17 17:45:27 2022 +0000
+++ b/plugins/adhoc/mod_adhoc.lua	Sun Apr 02 21:58:53 2023 +0200
@@ -15,7 +15,7 @@
 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