This commit is contained in:
Peter Maquiran
2022-04-07 14:24:07 +01:00
parent 34580da026
commit e8ffcca028
10 changed files with 83 additions and 14 deletions
+17
View File
@@ -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)