From 608b3639ea691af54ab0201d3c595645bfb8417a Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Thu, 18 May 2017 14:00:28 +0100 Subject: [PATCH] auth service enhancements (#1860) --- .../alfresco-authentication.service.ts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ng2-components/ng2-alfresco-core/src/services/alfresco-authentication.service.ts b/ng2-components/ng2-alfresco-core/src/services/alfresco-authentication.service.ts index 2ca469958b..e437b0832e 100644 --- a/ng2-components/ng2-alfresco-core/src/services/alfresco-authentication.service.ts +++ b/ng2-components/ng2-alfresco-core/src/services/alfresco-authentication.service.ts @@ -167,6 +167,28 @@ export class AlfrescoAuthenticationService { return this.alfrescoApi.getInstance().bpmAuth && !!this.alfrescoApi.getInstance().bpmAuth.isLoggedIn(); } + /** + * Get the ECM username + * + * @returns {string} The username value + * + * @memberof AlfrescoAuthenticationService + */ + getEcmUsername(): string { + return this.alfrescoApi.getInstance().ecmAuth.username; + } + + /** + * Get the BPM username + * + * @returns {string} The username value + * + * @memberof AlfrescoAuthenticationService + */ + getBpmUsername(): string { + return this.alfrescoApi.getInstance().bpmAuth.username; + } + /** * The method write the error in the console browser * @param error