mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-1794] Document List - users can see sites they are not members of (#2552)
* member sites * SitePaging type
This commit is contained in:
committed by
Eugenio Romano
parent
71e0204e01
commit
d019dab147
@@ -892,7 +892,7 @@ describe('DocumentList', () => {
|
||||
});
|
||||
|
||||
it('should not perform navigation for virtual sources', () => {
|
||||
const sources = ['-trashcan-', '-sharedlinks-', '-sites-', '-favorites-', '-recent-'];
|
||||
const sources = ['-trashcan-', '-sharedlinks-', '-sites-', '-mysites-', '-favorites-', '-recent-'];
|
||||
const node = new FolderNode('folder');
|
||||
|
||||
documentList.currentFolderId = 'node-id';
|
||||
@@ -927,6 +927,14 @@ describe('DocumentList', () => {
|
||||
expect(sitesApi.getSites).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should fetch user membership sites', () => {
|
||||
const peopleApi = apiService.getInstance().core.peopleApi;
|
||||
spyOn(peopleApi, 'getSiteMembership').and.returnValue(Promise.resolve());
|
||||
|
||||
documentList.loadFolderByNodeId('-mysites-');
|
||||
expect(peopleApi.getSiteMembership).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should fetch favorites', () => {
|
||||
const favoritesApi = apiService.getInstance().core.favoritesApi;
|
||||
spyOn(favoritesApi, 'getFavorites').and.returnValue(Promise.resolve(null));
|
||||
|
Reference in New Issue
Block a user