mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
remove getTicket and fix tasklist filter
This commit is contained in:
parent
a02a17d78b
commit
2f64605c93
@ -164,7 +164,7 @@ export class ActivitiTaskListService {
|
|||||||
if (appId) {
|
if (appId) {
|
||||||
return this.authService.getAlfrescoApi().activiti.taskApi.filterTasks({appDefinitionId: appId});
|
return this.authService.getAlfrescoApi().activiti.taskApi.filterTasks({appDefinitionId: appId});
|
||||||
} else {
|
} else {
|
||||||
return this.authService.getAlfrescoApi().activiti.taskApi.filterTasks({});
|
return this.authService.getAlfrescoApi().activiti.taskApi.filterTasks();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -246,7 +246,8 @@ describe('AlfrescoAuthentication', () => {
|
|||||||
it('should return both ECM and BPM tickets after the login done', (done) => {
|
it('should return both ECM and BPM tickets after the login done', (done) => {
|
||||||
authService.login('fake-username', 'fake-password').subscribe(() => {
|
authService.login('fake-username', 'fake-password').subscribe(() => {
|
||||||
expect(authService.isLoggedIn()).toBe(true);
|
expect(authService.isLoggedIn()).toBe(true);
|
||||||
expect(authService.getTicket()).toEqual(['fake-post-ticket', 'Basic ZmFrZS11c2VybmFtZTpmYWtlLXBhc3N3b3Jk']);
|
expect(authService.getTicketEcm()).toEqual('fake-post-ticket');
|
||||||
|
expect(authService.getTicketBpm()).toEqual('Basic ZmFrZS11c2VybmFtZTpmYWtlLXBhc3N3b3Jk');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -267,7 +268,8 @@ describe('AlfrescoAuthentication', () => {
|
|||||||
},
|
},
|
||||||
(err: any) => {
|
(err: any) => {
|
||||||
expect(authService.isLoggedIn()).toBe(false);
|
expect(authService.isLoggedIn()).toBe(false);
|
||||||
expect(authService.getTicket()).toBe(null);
|
expect(authService.getTicketEcm()).toBe(null);
|
||||||
|
expect(authService.getTicketBpm()).toBe(null);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -286,7 +288,8 @@ describe('AlfrescoAuthentication', () => {
|
|||||||
},
|
},
|
||||||
(err: any) => {
|
(err: any) => {
|
||||||
expect(authService.isLoggedIn()).toBe(false);
|
expect(authService.isLoggedIn()).toBe(false);
|
||||||
expect(authService.getTicket()).toBe(null);
|
expect(authService.getTicketEcm()).toBe(null);
|
||||||
|
expect(authService.getTicketBpm()).toBe(null);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -307,7 +310,8 @@ describe('AlfrescoAuthentication', () => {
|
|||||||
},
|
},
|
||||||
(err: any) => {
|
(err: any) => {
|
||||||
expect(authService.isLoggedIn()).toBe(false);
|
expect(authService.isLoggedIn()).toBe(false);
|
||||||
expect(authService.getTicket()).toBe(null);
|
expect(authService.getTicketEcm()).toBe(null);
|
||||||
|
expect(authService.getTicketBpm()).toBe(null);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -133,18 +133,6 @@ export class AlfrescoAuthenticationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* The method return the ECM and Bpm in an Array ticket stored in the localStorage
|
|
||||||
* @returns ticket
|
|
||||||
*/
|
|
||||||
public getTicket(): any {
|
|
||||||
if (localStorage.getItem('ticket-ECM') || localStorage.getItem('ticket-BPM')) {
|
|
||||||
return [localStorage.getItem('ticket-ECM'), localStorage.getItem('ticket-BPM')];
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The method return the BPM ticket stored in the localStorage
|
* The method return the BPM ticket stored in the localStorage
|
||||||
* @returns ticket
|
* @returns ticket
|
||||||
|
Loading…
x
Reference in New Issue
Block a user