diff --git a/demo-shell/src/app/components/app-layout/user-info/user-info.component.ts b/demo-shell/src/app/components/app-layout/user-info/user-info.component.ts index 6024062112..d0717fe9e8 100644 --- a/demo-shell/src/app/components/app-layout/user-info/user-info.component.ts +++ b/demo-shell/src/app/components/app-layout/user-info/user-info.component.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved. + * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ import { UserRepresentation } from '@alfresco/js-api'; @Component({ selector: 'app-shell-user-info', - templateUrl: './user-info.component.html' + template: '' }) export class UserInfoComponent implements OnInit { /** Custom choice for opening the menu at the bottom. Can be `before` or `after`. */ @@ -43,11 +43,11 @@ export class UserInfoComponent implements OnInit { userInfoMode = UserInfoMode; constructor( - private peopleContentService: PeopleContentService, - private peopleProcessService: PeopleProcessService, - private identityUserService: IdentityUserService, - private basicAlfrescoAuthService: BasicAlfrescoAuthService, - private authService: AuthenticationService + private readonly peopleContentService: PeopleContentService, + private readonly peopleProcessService: PeopleProcessService, + private readonly identityUserService: IdentityUserService, + private readonly basicAlfrescoAuthService: BasicAlfrescoAuthService, + private readonly authService: AuthenticationService ) {} ngOnInit() { @@ -96,17 +96,14 @@ export class UserInfoComponent implements OnInit { } private isAllLoggedIn() { - return ( - (this.authService.isEcmLoggedIn() && this.authService.isBpmLoggedIn()) || - (this.authService.isALLProvider() && this.basicAlfrescoAuthService.isKerberosEnabled()) - ); + return this.authService.isLoggedIn() || (this.authService.isALLProvider() && this.basicAlfrescoAuthService.isKerberosEnabled()); } private isBpmLoggedIn() { - return this.authService.isBpmLoggedIn() || (this.authService.isECMProvider() && this.basicAlfrescoAuthService.isKerberosEnabled()); + return this.authService.isLoggedIn() || (this.authService.isECMProvider() && this.basicAlfrescoAuthService.isKerberosEnabled()); } private isEcmLoggedIn() { - return this.authService.isEcmLoggedIn() || (this.authService.isECMProvider() && this.basicAlfrescoAuthService.isKerberosEnabled()); + return this.authService.isLoggedIn() || (this.authService.isECMProvider() && this.basicAlfrescoAuthService.isKerberosEnabled()); } } diff --git a/lib/core/src/lib/auth/services/authentication.service.ts b/lib/core/src/lib/auth/services/authentication.service.ts index a0caca3641..1dfb9eef4f 100644 --- a/lib/core/src/lib/auth/services/authentication.service.ts +++ b/lib/core/src/lib/auth/services/authentication.service.ts @@ -122,7 +122,7 @@ export class AuthenticationService implements AuthenticationServiceInterface, ee */ isEcmLoggedIn(): boolean { if (this.isOauth()) { - return this.oidcAuthenticationService.isEcmLoggedIn(); + return this.oidcAuthenticationService.isLoggedIn(); } else { return this.basicAlfrescoAuthService.isEcmLoggedIn(); } @@ -134,7 +134,7 @@ export class AuthenticationService implements AuthenticationServiceInterface, ee */ isBpmLoggedIn(): boolean { if (this.isOauth()) { - return this.oidcAuthenticationService.isBpmLoggedIn(); + return this.oidcAuthenticationService.isLoggedIn(); } else { return this.basicAlfrescoAuthService.isBpmLoggedIn(); }