Skip to content

Commit 887455a

Browse files
authored
[ACS-9768] remove deprecated methods from auth related components (#4688)
* [ACS-9768] remove deprecated methods from auth related components [link-adf:ACS-9768-Remove-deprecated-methods-from-auth-related-components] * [ACS-9786] replace deprecated methods
1 parent 9634b60 commit 887455a

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

projects/aca-content/about/src/about.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class AboutComponent implements OnInit {
5454
landingPage = this.appSettings.landingPage;
5555

5656
ngOnInit(): void {
57-
if (this.authService.isEcmLoggedIn()) {
57+
if (this.authService.isLoggedIn()) {
5858
this.setECMInfo();
5959
}
6060
}

projects/aca-content/ms-office/src/aos-extension.service.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe('AosEditOnlineService', () => {
4646
authenticationService = TestBed.inject(AuthenticationService);
4747
appConfigService = TestBed.inject(AppConfigService);
4848

49-
spyOn(authenticationService, 'getEcmUsername').and.returnValue('user1');
49+
spyOn(authenticationService, 'getUsername').and.returnValue('user1');
5050
spyOn(appConfigService, 'get').and.returnValue('http://localhost:3000');
5151
userAgent = spyOnProperty(navigator, 'userAgent').and.returnValue('mac');
5252
});

projects/aca-content/ms-office/src/aos-extension.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class AosEditOnlineService implements IAosEditOnlineService {
5151
// );
5252
const checkedOut = node.properties['cm:lockType'] === 'WRITE_LOCK' || node.properties['cm:lockType'] === 'READ_ONLY_LOCK';
5353
const lockOwner = node.properties['cm:lockOwner'];
54-
const differentLockOwner = lockOwner.id !== this.authenticationService.getEcmUsername();
54+
const differentLockOwner = lockOwner.id !== this.authenticationService.getUsername();
5555

5656
if (checkedOut && differentLockOwner) {
5757
this.onAlreadyLockedNotification(node.id, lockOwner.id);

projects/aca-content/src/lib/components/view-profile/view-profile.guard.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,5 @@ import { AuthenticationService } from '@alfresco/adf-core';
2929
export const ViewProfileRuleGuard: CanActivateFn = () => {
3030
const authService = inject(AuthenticationService);
3131

32-
const isEcmLoggedIn = (): boolean => {
33-
return authService.isEcmLoggedIn() || (authService.isECMProvider() && authService.isKerberosEnabled());
34-
};
35-
36-
return isEcmLoggedIn() || authService.isOauth();
32+
return authService.isLoggedIn() || authService.isOauth();
3733
};

0 commit comments

Comments
 (0)