From 34e8832bae274a5c4b062a8dda1604252d51370d Mon Sep 17 00:00:00 2001 From: Pablo Martinez Garcia Date: Thu, 9 Jun 2022 11:01:42 +0200 Subject: [PATCH] [AAE-8155] Fix typo in providers (#7669) --- lib/core/services/auth-guard-sso-role.service.spec.ts | 4 ++-- lib/core/services/auth-guard-sso-role.service.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/core/services/auth-guard-sso-role.service.spec.ts b/lib/core/services/auth-guard-sso-role.service.spec.ts index e02cef7b2f..df8fbdd273 100644 --- a/lib/core/services/auth-guard-sso-role.service.spec.ts +++ b/lib/core/services/auth-guard-sso-role.service.spec.ts @@ -47,7 +47,7 @@ describe('Auth Guard SSO role service', () => { beforeEach(() => { appConfig = TestBed.inject(AppConfigService); - appConfig.config.provider = 'ECM'; + appConfig.config.providers = 'ECM'; localStorage.clear(); authGuard = TestBed.inject(AuthGuardSsoRoleService); 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 () => { spyUserAccess([], {}); spyOn(peopleContentService, 'getCurrentPerson'); - appConfig.config.provider = 'BPM'; + appConfig.config.providers = 'BPM'; const router: ActivatedRouteSnapshot = new ActivatedRouteSnapshot(); router.data = { roles: ['ALFRESCO_ADMINISTRATORS'] }; diff --git a/lib/core/services/auth-guard-sso-role.service.ts b/lib/core/services/auth-guard-sso-role.service.ts index 49bc01151c..f73b7b7c33 100644 --- a/lib/core/services/auth-guard-sso-role.service.ts +++ b/lib/core/services/auth-guard-sso-role.service.ts @@ -74,7 +74,7 @@ export class AuthGuardSsoRoleService implements CanActivate { } 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); return hasContentProvider && checkAdminRole; }