# HG changeset patch # User Kim Alvefur # Date 1678374175 -3600 # Node ID 6cb339423928c87916bef876f8e60abb48a9658f # Parent ae0fba27fc2459a414071b1b6a956c9b37e600e2 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. diff -r ae0fba27fc24 -r 6cb339423928 plugins/mod_authz_internal.lua --- a/plugins/mod_authz_internal.lua Sun Mar 05 15:45:44 2023 +0100 +++ b/plugins/mod_authz_internal.lua Thu Mar 09 16:02:55 2023 +0100 @@ -193,7 +193,7 @@ 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);