[ACS-8770] fix sonarcube issues

This commit is contained in:
Anton Ramanovich
2025-06-12 09:50:10 +02:00
parent 67b6a8d043
commit 5880905240
2 changed files with 12 additions and 15 deletions
@@ -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());
}
}
@@ -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();
}