mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-8155] Fix typo in providers (#7669)
This commit is contained in:
committed by
GitHub
parent
4d1c729620
commit
34e8832bae
@@ -47,7 +47,7 @@ describe('Auth Guard SSO role service', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
appConfig = TestBed.inject(AppConfigService);
|
appConfig = TestBed.inject(AppConfigService);
|
||||||
appConfig.config.provider = 'ECM';
|
appConfig.config.providers = 'ECM';
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
authGuard = TestBed.inject(AuthGuardSsoRoleService);
|
authGuard = TestBed.inject(AuthGuardSsoRoleService);
|
||||||
jwtHelperService = TestBed.inject(JwtHelperService);
|
jwtHelperService = TestBed.inject(JwtHelperService);
|
||||||
@@ -222,7 +222,7 @@ describe('Auth Guard SSO role service', () => {
|
|||||||
it('Should not retrieve the user when the provider is BPM', async () => {
|
it('Should not retrieve the user when the provider is BPM', async () => {
|
||||||
spyUserAccess([], {});
|
spyUserAccess([], {});
|
||||||
spyOn(peopleContentService, 'getCurrentPerson');
|
spyOn(peopleContentService, 'getCurrentPerson');
|
||||||
appConfig.config.provider = 'BPM';
|
appConfig.config.providers = 'BPM';
|
||||||
|
|
||||||
const router: ActivatedRouteSnapshot = new ActivatedRouteSnapshot();
|
const router: ActivatedRouteSnapshot = new ActivatedRouteSnapshot();
|
||||||
router.data = { roles: ['ALFRESCO_ADMINISTRATORS'] };
|
router.data = { roles: ['ALFRESCO_ADMINISTRATORS'] };
|
||||||
|
@@ -74,7 +74,7 @@ export class AuthGuardSsoRoleService implements CanActivate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private checkContentAdministratorRole(rolesToCheck: string[], excludedRoles: string[]): boolean {
|
private checkContentAdministratorRole(rolesToCheck: string[], excludedRoles: string[]): boolean {
|
||||||
const hasContentProvider = this.appConfig.config.provider === 'ECM' || this.appConfig.config.provider === 'ALL';
|
const hasContentProvider = this.appConfig.config.providers === 'ECM' || this.appConfig.config.providers === 'ALL';
|
||||||
const checkAdminRole = rolesToCheck.includes(ContentGroups.ALFRESCO_ADMINISTRATORS) || excludedRoles.includes(ContentGroups.ALFRESCO_ADMINISTRATORS);
|
const checkAdminRole = rolesToCheck.includes(ContentGroups.ALFRESCO_ADMINISTRATORS) || excludedRoles.includes(ContentGroups.ALFRESCO_ADMINISTRATORS);
|
||||||
return hasContentProvider && checkAdminRole;
|
return hasContentProvider && checkAdminRole;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user