mirror of
https://github.com/bjc/prosody.git
synced 2025-03-31 11:47:40 +03:00
core.usermanager: Fix COMPAT layer for legacy is_admin() function
Thanks ctrlaltca Fixes #1912
This commit is contained in:
parent
0ed2d38edf
commit
6959547703
1 changed files with 2 additions and 1 deletions
|
@ -307,7 +307,8 @@ local function is_admin(jid, host)
|
|||
end
|
||||
log("warn", "Usage of legacy is_admin() API, which will be disabled in a future build: %s", debug.traceback());
|
||||
log("warn", "See https://prosody.im/doc/developers/permissions about the new permissions API");
|
||||
return legacy_admin_roles[get_jid_role(jid, host)] or false;
|
||||
local role = get_jid_role(jid, host);
|
||||
return role and legacy_admin_roles[role.name] or false;
|
||||
end
|
||||
|
||||
local function get_users_with_role(role, host)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue