feat: allow admins to assign the admin role to other users
This commit is contained in:
@@ -152,7 +152,7 @@ export function getRoleLevel(role: Role): number {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function canManageRole(managerRole: Role, targetRole: Role): boolean {
|
export function canManageRole(managerRole: Role, targetRole: Role): boolean {
|
||||||
return roleHierarchy[managerRole] > roleHierarchy[targetRole];
|
return roleHierarchy[managerRole] >= roleHierarchy[targetRole];
|
||||||
}
|
}
|
||||||
|
|
||||||
export function hasPermissionInDefaults(
|
export function hasPermissionInDefaults(
|
||||||
|
|||||||
Reference in New Issue
Block a user