[Trunk | Monitor Dashboard]: monitor.component: Show "style_switcher" (icon for administration portal), if user is logged in (not logged in and admin).

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@58725 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
Konstantina Galouni 2020-05-19 16:38:01 +00:00
parent 2eb711011e
commit 7737ecaa42
2 changed files with 5 additions and 1 deletions

View File

@ -173,7 +173,7 @@
</div>
</div>
</div>
<a *ngIf="stakeholder && isAdmin()" id="style_switcher" class="" routerLinkActive="active"
<a *ngIf="stakeholder && isLoggedIn()" id="style_switcher" class="" routerLinkActive="active"
[routerLink]="['/admin', this.stakeholder.alias]">
<div id="style_switcher_toggle"><i class="material-icons">settings</i></div>
</a>

View File

@ -391,6 +391,10 @@ export class MonitorComponent implements OnInit, OnDestroy, IDeactivateComponent
return this.user && Session.isPortalAdministrator(this.user);
}
isLoggedIn() {
return this.user;
}
public isPublicOrIsMember(isPublic: boolean): boolean {
if (isPublic) {
return true;