diff --git a/smp-angular/src/app/app.component.html b/smp-angular/src/app/app.component.html index 6430c83989f01e0b148da751f896f65b9576e652..9f937de93ed4e52931c3c95f55ca742582d2a293 100644 --- a/smp-angular/src/app/app.component.html +++ b/smp-angular/src/app/app.component.html @@ -95,12 +95,13 @@ <button *ngIf="isUserAuthPasswdEnabled" mat-menu-item id="changePassword_id" (click)="changeCurrentUserPassword()"> <span>Change password</span> </button> + <button *ngIf="isUserAuthSSOEnabled" mat-menu-item id="showSSODetails_id" (click)="openCurrentCasUserData()"> + <span>Open CAS user data</span> + </button> <button *ngIf="isWebServiceUserTokenAuthPasswdEnabled" mat-menu-item id="getAccessToken_id" (click)="regenerateCurrentUserAccessToken()"> <span>Generated access token</span> </button> - <hr/> - <button mat-menu-item (click)="logout($event)" id="logout_id"> <mat-icon>power_settings_new</mat-icon> <span>Logout</span> diff --git a/smp-angular/src/app/app.component.ts b/smp-angular/src/app/app.component.ts index f212b3e8e3cd970669b22a00cc9f73e07cca4692..da611b1b9ab485416a413a7dc2a858944cb420af 100644 --- a/smp-angular/src/app/app.component.ts +++ b/smp-angular/src/app/app.component.ts @@ -34,6 +34,10 @@ export class AppComponent { this.userController = new UserController(this.http, this.lookups, this.dialog); } + openCurrentCasUserData() { + window.open(this.securityService.getCurrentUser().casUserDataUrl, "_blank"); + } + get isWebServiceUserTokenAuthPasswdEnabled(): boolean { return this.lookups.cachedApplicationConfig?.webServiceAuthTypes?.includes('TOKEN'); } @@ -42,6 +46,10 @@ export class AppComponent { return this.lookups.cachedApplicationInfo?.authTypes.includes('PASSWORD'); } + get isUserAuthSSOEnabled(): boolean { + return this.lookups.cachedApplicationInfo?.authTypes?.includes('SSO'); + } + isCurrentUserSystemAdmin(): boolean { return this.securityService.isCurrentUserInRole([Authority.SYSTEM_ADMIN]); }