mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
fix
This commit is contained in:
@@ -35,6 +35,23 @@ export class PermissionService {
|
||||
return false;
|
||||
}
|
||||
|
||||
userPermissionCount(args) {
|
||||
if(!Array.isArray(args)) {
|
||||
args = [args]
|
||||
}
|
||||
|
||||
let count = 0
|
||||
|
||||
for(let permission of (this.SessionStore.user.UserPermissions || [])) {
|
||||
if (args.includes(permission)) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
role(args: any) {
|
||||
|
||||
let UserRoleIsValid = this.userRole(args)
|
||||
|
||||
Reference in New Issue
Block a user