refactor(view access): if role [] then allow them to see it
This commit is contained in:
@@ -13,6 +13,7 @@ export function hasAccess(user: User | null, moduleName: string | null, modules:
|
||||
}
|
||||
|
||||
export function hasPageAccess(user: User | null, role: any, module_id: string): boolean {
|
||||
if (role.length === 0) return true;
|
||||
if (!user) return false;
|
||||
|
||||
// get only the module in the user profile
|
||||
|
||||
Reference in New Issue
Block a user