mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2139] extra cookie availability check (#2865)
* extra cookie availability check * code style and test fixes * unit tests
This commit is contained in:
committed by
Eugenio Romano
parent
900fd70d63
commit
49456b3fcd
@@ -96,7 +96,7 @@ export class AuthenticationService {
|
||||
*
|
||||
* @returns {boolean}
|
||||
*/
|
||||
private isRememberMeSet(): boolean {
|
||||
isRememberMeSet(): boolean {
|
||||
return (this.cookie.getItem(REMEMBER_ME_COOKIE_KEY) === null) ? false : true;
|
||||
}
|
||||
|
||||
@@ -200,7 +200,10 @@ export class AuthenticationService {
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isEcmLoggedIn(): boolean {
|
||||
return this.isRememberMeSet() && this.alfrescoApi.getInstance().ecmAuth && !!this.alfrescoApi.getInstance().ecmAuth.isLoggedIn();
|
||||
if (this.cookie.isEnabled() && !this.isRememberMeSet()) {
|
||||
return false;
|
||||
}
|
||||
return this.alfrescoApi.getInstance().ecmAuth && !!this.alfrescoApi.getInstance().ecmAuth.isLoggedIn();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -209,7 +212,10 @@ export class AuthenticationService {
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isBpmLoggedIn(): boolean {
|
||||
return this.isRememberMeSet() && this.alfrescoApi.getInstance().bpmAuth && !!this.alfrescoApi.getInstance().bpmAuth.isLoggedIn();
|
||||
if (this.cookie.isEnabled() && !this.isRememberMeSet()) {
|
||||
return false;
|
||||
}
|
||||
return this.alfrescoApi.getInstance().bpmAuth && !!this.alfrescoApi.getInstance().bpmAuth.isLoggedIn();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user