aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/moduleapi.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua
index fe248c20..0ec96fb6 100644
--- a/core/moduleapi.lua
+++ b/core/moduleapi.lua
@@ -604,6 +604,14 @@ end
function api:default_permission(role_name, permission)
permission = permission:gsub("^:", self.name..":");
+ if self.host == "*" then
+ for _, host in pairs(hosts) do
+ if host.authz then
+ host.authz.add_default_permission(role_name, permission);
+ end
+ end
+ return
+ end
hosts[self.host].authz.add_default_permission(role_name, permission);
end