mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Added getAuthorizedCollection method to CollectionDataService
This commit is contained in:
@@ -41,11 +41,26 @@ export class CollectionDataService extends ComColDataService<Collection> {
|
|||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all collections whom user has authorization to submit
|
||||||
|
*
|
||||||
|
* @return Observable<RemoteData<PaginatedList<Collection>>>
|
||||||
|
* collection list
|
||||||
|
*/
|
||||||
|
getAuthorizedCollection(): Observable<RemoteData<PaginatedList<Collection>>> {
|
||||||
|
const searchHref = 'findAuthorized';
|
||||||
|
const options = new FindAllOptions();
|
||||||
|
options.elementsPerPage = 1000;
|
||||||
|
|
||||||
|
return this.searchBy(searchHref, options).pipe(
|
||||||
|
filter((collections: RemoteData<PaginatedList<Collection>>) => !collections.isResponsePending));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all collections whom user has authorization to submit to by community
|
* Get all collections whom user has authorization to submit to by community
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return Observable<RemoteData<PaginatedList<Collection>>>
|
||||||
* true if the user has at least one collection to submit to
|
* collection list
|
||||||
*/
|
*/
|
||||||
getAuthorizedCollectionByCommunity(communityId): Observable<RemoteData<PaginatedList<Collection>>> {
|
getAuthorizedCollectionByCommunity(communityId): Observable<RemoteData<PaginatedList<Collection>>> {
|
||||||
const searchHref = 'findAuthorizedByCommunity';
|
const searchHref = 'findAuthorizedByCommunity';
|
||||||
|
Reference in New Issue
Block a user