72517: ITs for authorization features for edit item in REST

- Fix for getItemObject() in ItemServiceImpl and CommunityServiceImpl for DELETE actions
This commit is contained in:
Peter Nijs
2020-08-25 17:39:50 +02:00
parent d83f43f017
commit fae212d281
6 changed files with 849 additions and 20 deletions

View File

@@ -629,6 +629,10 @@ public class CommunityServiceImpl extends DSpaceObjectServiceImpl<Community> imp
case Constants.DELETE:
if (AuthorizeConfiguration.canCommunityAdminPerformSubelementDeletion()) {
adminObject = getParentObject(context, community);
if (adminObject == null) {
//top-level community, has to be admin of the current communitu
adminObject = community;
}
}
break;
case Constants.ADD: