mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-08 18:44:22 +00:00
[DS-3179] Collection admin, edit item no authorization to remove file in JSPUI: Additional fixes to fix the unit tests
This commit is contained in:
@@ -395,15 +395,16 @@ public class CommunityServiceImpl extends DSpaceObjectServiceImpl<Community> imp
|
||||
// Check authorisation
|
||||
authorizeService.authorizeAction(context, community, Constants.REMOVE);
|
||||
|
||||
community.removeCollection(collection);
|
||||
ArrayList<String> removedIdentifiers = collectionService.getIdentifiers(context, collection);
|
||||
String removedHandle = collection.getHandle();
|
||||
UUID removedId = collection.getID();
|
||||
|
||||
|
||||
collection.removeCommunity(community);
|
||||
if(CollectionUtils.isEmpty(collection.getCommunities())){
|
||||
if(collection.getCommunities().size() == 1)
|
||||
{
|
||||
collectionService.delete(context, collection);
|
||||
}else{
|
||||
community.removeCollection(collection);
|
||||
collection.removeCommunity(community);
|
||||
}
|
||||
|
||||
log.info(LogManager.getHeader(context, "remove_collection",
|
||||
|
Reference in New Issue
Block a user