Build user pages
This commit is contained in:
@@ -6,7 +6,7 @@ export const ROLES = {
|
||||
} as const;
|
||||
|
||||
export function hasRole(userRoleId: number | null | undefined, requiredRoleId: number): boolean {
|
||||
if (userRoleId == null) return false;
|
||||
if (userRoleId == null || userRoleId < 1) return false;
|
||||
return userRoleId <= requiredRoleId;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user