feat: allow admins to assign the admin role to other users

This commit is contained in:
Henry
2026-01-29 22:07:50 +00:00
parent a2ef6609f2
commit fc41d17bcb

View File

@@ -152,7 +152,7 @@ export function getRoleLevel(role: Role): number {
}
export function canManageRole(managerRole: Role, targetRole: Role): boolean {
return roleHierarchy[managerRole] > roleHierarchy[targetRole];
return roleHierarchy[managerRole] >= roleHierarchy[targetRole];
}
export function hasPermissionInDefaults(