mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Added tests for user-info component
This commit is contained in:
@@ -82,6 +82,7 @@ export class AlfrescoAuthenticationService {
|
||||
* @returns {Observable<R>|Observable<T>}
|
||||
*/
|
||||
login(username: string, password: string): Observable<{ type: string, ticket: any }> {
|
||||
this.removeTicket();
|
||||
return Observable.fromPromise(this.callApiLogin(username, password))
|
||||
.map((response: any) => {
|
||||
this.saveTickets();
|
||||
@@ -191,6 +192,20 @@ export class AlfrescoAuthenticationService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The method return true if user is logged in on ecm provider
|
||||
*/
|
||||
public isEcmLoggedIn() {
|
||||
return this.alfrescoApi.ecmAuth && !!this.alfrescoApi.ecmAuth.isLoggedIn();
|
||||
}
|
||||
|
||||
/**
|
||||
* The method return true if user is logged in on bpm provider
|
||||
*/
|
||||
public isBpmLoggedIn() {
|
||||
return this.alfrescoApi.bpmAuth && !!this.alfrescoApi.bpmAuth.isLoggedIn();
|
||||
}
|
||||
|
||||
/**
|
||||
* The method write the error in the console browser
|
||||
* @param error
|
||||
|
Reference in New Issue
Block a user