Software /
code /
prosody
Comparison
core/moduleapi.lua @ 12644:4262ce516e6c
core.moduleapi: Fixup method name
`get_user_role()` did not exist anywhere else.
MattJ said `get_user_default_role()` was indented
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 15 Jun 2022 23:03:15 +0200 |
parent | 12642:9061f9621330 |
child | 12645:a741183eec97 |
comparison
equal
deleted
inserted
replaced
12643:9fa749cbd376 | 12644:4262ce516e6c |
---|---|
617 function api:may(action, context) | 617 function api:may(action, context) |
618 if type(context) == "string" then -- check JID permissions | 618 if type(context) == "string" then -- check JID permissions |
619 local role; | 619 local role; |
620 local node, host = jid_split(context); | 620 local node, host = jid_split(context); |
621 if host == self.host then | 621 if host == self.host then |
622 role = hosts[host].authz.get_user_role(node); | 622 role = hosts[host].authz.get_user_default_role(node); |
623 else | 623 else |
624 role = hosts[self.host].authz.get_jid_role(context); | 624 role = hosts[self.host].authz.get_jid_role(context); |
625 end | 625 end |
626 if not role then | 626 if not role then |
627 self:log("debug", "Access denied: JID <%s> may not %s (no role found)", context, action); | 627 self:log("debug", "Access denied: JID <%s> may not %s (no role found)", context, action); |