initial commit
This commit is contained in:
@@ -17,6 +17,7 @@ export const useRoleAccess = () => {
|
||||
isManager,
|
||||
hasAccess: (level: RoleEnum) => {
|
||||
const hierarchy = [RoleEnum.USER, RoleEnum.ADMIN, RoleEnum.MANAGER];
|
||||
|
||||
return (
|
||||
currentRole !== undefined &&
|
||||
hierarchy.indexOf(currentRole) >= hierarchy.indexOf(level)
|
||||
|
||||
Reference in New Issue
Block a user