mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-10-08 14:51:14 +00:00
[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
This commit is contained in:
committed by
GitHub
parent
9634b60aaa
commit
887455a0ef
@@ -54,7 +54,7 @@ export class AboutComponent implements OnInit {
|
||||
landingPage = this.appSettings.landingPage;
|
||||
|
||||
ngOnInit(): void {
|
||||
if (this.authService.isEcmLoggedIn()) {
|
||||
if (this.authService.isLoggedIn()) {
|
||||
this.setECMInfo();
|
||||
}
|
||||
}
|
||||
|
@@ -46,7 +46,7 @@ describe('AosEditOnlineService', () => {
|
||||
authenticationService = TestBed.inject(AuthenticationService);
|
||||
appConfigService = TestBed.inject(AppConfigService);
|
||||
|
||||
spyOn(authenticationService, 'getEcmUsername').and.returnValue('user1');
|
||||
spyOn(authenticationService, 'getUsername').and.returnValue('user1');
|
||||
spyOn(appConfigService, 'get').and.returnValue('http://localhost:3000');
|
||||
userAgent = spyOnProperty(navigator, 'userAgent').and.returnValue('mac');
|
||||
});
|
||||
|
@@ -51,7 +51,7 @@ export class AosEditOnlineService implements IAosEditOnlineService {
|
||||
// );
|
||||
const checkedOut = node.properties['cm:lockType'] === 'WRITE_LOCK' || node.properties['cm:lockType'] === 'READ_ONLY_LOCK';
|
||||
const lockOwner = node.properties['cm:lockOwner'];
|
||||
const differentLockOwner = lockOwner.id !== this.authenticationService.getEcmUsername();
|
||||
const differentLockOwner = lockOwner.id !== this.authenticationService.getUsername();
|
||||
|
||||
if (checkedOut && differentLockOwner) {
|
||||
this.onAlreadyLockedNotification(node.id, lockOwner.id);
|
||||
|
@@ -29,9 +29,5 @@ import { AuthenticationService } from '@alfresco/adf-core';
|
||||
export const ViewProfileRuleGuard: CanActivateFn = () => {
|
||||
const authService = inject(AuthenticationService);
|
||||
|
||||
const isEcmLoggedIn = (): boolean => {
|
||||
return authService.isEcmLoggedIn() || (authService.isECMProvider() && authService.isKerberosEnabled());
|
||||
};
|
||||
|
||||
return isEcmLoggedIn() || authService.isOauth();
|
||||
return authService.isLoggedIn() || authService.isOauth();
|
||||
};
|
||||
|
Reference in New Issue
Block a user