add admin interface, angular migration
This commit is contained in:
@@ -158,6 +158,13 @@ export class MainComponent {
|
||||
}
|
||||
}
|
||||
|
||||
hasAdminRole(): boolean {
|
||||
if (this.auth && this.auth.authorities) {
|
||||
return this.auth.authorities.some((auth: any) => auth.authority === 'ROLE_ADMIN');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
openExternal(url, target = '_self') {
|
||||
window.open(url, target);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user