mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-08 14:51:32 +00:00
Should not redirect if is SilentLogin on (#5216)
* fix redirect * fix lint * remove false behaviour alrady tested in the new unit test * Update auth-guard-base.ts
This commit is contained in:
committed by
Denys Vuika
parent
3c1097fb84
commit
5578b7b851
@@ -92,17 +92,6 @@ describe('AuthGuardService BPM', () => {
|
||||
expect(router.navigateByUrl).toHaveBeenCalled();
|
||||
}));
|
||||
|
||||
it('should redirect url if the alfresco js api is NOT logged in and isOAuthWithSilentLogin', async(() => {
|
||||
spyOn(router, 'navigateByUrl').and.stub();
|
||||
spyOn(authService, 'isBpmLoggedIn').and.returnValue(false);
|
||||
spyOn(authService, 'isOauth').and.returnValue(true);
|
||||
appConfigService.config.oauth2.silentLogin = true;
|
||||
const route: RouterStateSnapshot = <RouterStateSnapshot> {url : 'some-url'};
|
||||
|
||||
expect(authGuard.canActivate(null, route)).toBeFalsy();
|
||||
expect(router.navigateByUrl).toHaveBeenCalled();
|
||||
}));
|
||||
|
||||
it('should redirect url if NOT logged in and isOAuth but no silentLogin configured', async(() => {
|
||||
spyOn(router, 'navigateByUrl').and.stub();
|
||||
spyOn(authService, 'isBpmLoggedIn').and.returnValue(false);
|
||||
|
Reference in New Issue
Block a user