Changeset

12925:6cb339423928

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.
author Kim Alvefur <zash@zash.se>
date Thu, 09 Mar 2023 16:02:55 +0100
parents 12924:ae0fba27fc24
children 12926:f9e474cb86ac
files plugins/mod_authz_internal.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);