Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 47041853 authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

Pull request #234: UI: add action to open SSO data from "sandwich menu"

Merge in EDELIVERY/smp from EDELIVERY-9784-open-cas-button-should-be-moved-from-add-edit-user-dialog-to-the-sandwich-menu-in to development

* commit '8953f21287eac02e9c56ecaa375ba4f7460760c8':
  UI: add action to open SSO data from "sandwich menu"
parents 3e4d6c99 db6e3d5a
No related branches found
No related tags found
No related merge requests found
......@@ -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>
......
......@@ -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]);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment