bugfixing
This commit is contained in:
@@ -41,9 +41,13 @@ export class RoleDirective implements OnInit {
|
||||
|
||||
private checkPermission() {
|
||||
if (this.currentUser && this.currentUser.role) {
|
||||
if (this.currentUser.role === 'admin') return true;
|
||||
if (this.currentUser.role === 'admin') {
|
||||
return true;
|
||||
}
|
||||
for (const role of this.appRole) {
|
||||
if (this.currentUser.role.indexOf(role) !== -1) return true;
|
||||
if (this.currentUser.role.indexOf(role) !== -1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user