aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-03-09 16:02:55 +0100
committerKim Alvefur <zash@zash.se>2023-03-09 16:02:55 +0100
commitcb65c589501f66709867c632773904a8eb5134db (patch)
tree22f098b3e6560f09af2d203173ab480884e778f5 /plugins
parent11a3373e890b71e937fbfd3283a427f7b782d484 (diff)
downloadprosody-cb65c589501f66709867c632773904a8eb5134db.tar.gz
prosody-cb65c589501f66709867c632773904a8eb5134db.zip
mod_authz_internal: Fix wrong role name field in user_can_assume_role()
Made it reject the primary role since it compares against a non-existent field, i.e. nil.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_authz_internal.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_authz_internal.lua b/plugins/mod_authz_internal.lua
index 7e01e689..1f2b3886 100644
--- a/plugins/mod_authz_internal.lua
+++ b/plugins/mod_authz_internal.lua
@@ -193,7 +193,7 @@ end
function user_can_assume_role(user, role_name)
local primary_role = get_user_role(user);
- if primary_role and primary_role.role_name == role_name then
+ if primary_role and primary_role.name == role_name then
return true;
end
local secondary_roles = get_user_secondary_roles(user);