multiple role management

This commit is contained in:
2020-04-25 15:32:53 +02:00
committed by smuddy
parent e17b8acc9c
commit 01d13ccea9
12 changed files with 99 additions and 42 deletions

View File

@@ -44,7 +44,7 @@ export class RoleDirective implements OnInit {
if (this.currentUser && this.currentUser.role) {
if (this.currentUser.role === 'admin') return true;
for (const role of this.appRole) {
if (this.currentUser.role === role) return true;
if (this.currentUser.role.indexOf(role) !== -1) return true;
}
}