aboutsummaryrefslogtreecommitdiffstats
path: root/core/moduleapi.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core/moduleapi.lua')
-rw-r--r--core/moduleapi.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua
index 8790a9d3..73ce4911 100644
--- a/core/moduleapi.lua
+++ b/core/moduleapi.lua
@@ -538,6 +538,7 @@ function api:load_resource(path, mode)
end
function api:open_store(name, store_type)
+ if self.host == "*" then return nil, "global-storage-not-supported"; end
return require"core.storagemanager".open(self.host, name or self.name, store_type);
end
@@ -629,7 +630,7 @@ function api:may(action, context)
local role;
local node, host = jid_split(context);
if host == self.host then
- role = hosts[host].authz.get_user_default_role(node);
+ role = hosts[host].authz.get_user_role(node);
else
role = hosts[self.host].authz.get_jid_role(context);
end