diff options
author | Kim Alvefur <zash@zash.se> | 2023-03-09 16:02:55 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-03-09 16:02:55 +0100 |
commit | cb65c589501f66709867c632773904a8eb5134db (patch) | |
tree | 22f098b3e6560f09af2d203173ab480884e778f5 /plugins | |
parent | 11a3373e890b71e937fbfd3283a427f7b782d484 (diff) | |
download | prosody-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.lua | 2 |
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); |