From 7db91b47af9f00f9f0ca70a336c39a7affecb0c6 Mon Sep 17 00:00:00 2001 From: Amedeo Lepore Date: Fri, 17 Mar 2023 11:44:52 +0100 Subject: [PATCH] [AAE-12501] Restore get username methods --- .../auth/services/authentication.service.ts | 18 ++++++++++++++++++ .../services/base-authentication.service.ts | 2 ++ 2 files changed, 20 insertions(+) diff --git a/lib/core/src/lib/auth/services/authentication.service.ts b/lib/core/src/lib/auth/services/authentication.service.ts index 73e69fa827..50bd6785e7 100644 --- a/lib/core/src/lib/auth/services/authentication.service.ts +++ b/lib/core/src/lib/auth/services/authentication.service.ts @@ -160,6 +160,24 @@ export class AuthenticationService extends BaseAuthenticationService { return false; } + /** + * Gets the ECM username. + * + * @returns The ECM username + */ + getEcmUsername(): string { + return this.alfrescoApi.getInstance().getEcmUsername(); + } + + /** + * Gets the BPM username + * + * @returns The BPM username + */ + getBpmUsername(): string { + return this.alfrescoApi.getInstance().getBpmUsername(); + } + /** * Gets the auth token. * diff --git a/lib/core/src/lib/auth/services/base-authentication.service.ts b/lib/core/src/lib/auth/services/base-authentication.service.ts index f3e52c8b16..0b5a0f01b5 100644 --- a/lib/core/src/lib/auth/services/base-authentication.service.ts +++ b/lib/core/src/lib/auth/services/base-authentication.service.ts @@ -50,6 +50,8 @@ export abstract class BaseAuthenticationService { abstract logout(): Observable; abstract isEcmLoggedIn(): boolean; abstract isBpmLoggedIn(): boolean; + abstract getEcmUsername(): string; + abstract getBpmUsername(): string; abstract reset(): void; abstract once(event: string): Observable;