[ADF-2200] fixed redirectUrl check (#2886)

This commit is contained in:
Vito
2018-01-25 17:54:43 +01:00
committed by Eugenio Romano
parent 657c28491a
commit 0ad4bf6eb9
2 changed files with 21 additions and 3 deletions

View File

@@ -239,15 +239,15 @@ export class AuthenticationService {
}
getRedirectUrl(provider: string): string {
return this.hasValidRedirection(provider) ? this.redirectUrl.url : null;
return this.hasValidRedirection(provider) ? this.redirectUrl.url : null;
}
private hasValidRedirection(provider: string): boolean {
return this.redirectUrl && this.redirectUrl.provider === provider || this.hasSelectedProviderAll(provider);
return this.redirectUrl && (this.redirectUrl.provider === provider || this.hasSelectedProviderAll(provider));
}
private hasSelectedProviderAll(provider: string): boolean {
return this.redirectUrl && this.redirectUrl.provider === 'ALL' || provider === 'ALL';
return this.redirectUrl && (this.redirectUrl.provider === 'ALL' || provider === 'ALL');
}
/**