mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-16 22:43:12 +00:00
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:
@@ -1100,19 +1100,7 @@ prevent the generation of resource policy entry values with null dspace_object a
|
||||
}
|
||||
break;
|
||||
case Constants.DELETE:
|
||||
if (item.getOwningCollection() != null) {
|
||||
if (AuthorizeConfiguration.canCollectionAdminPerformItemDeletion()) {
|
||||
adminObject = collection;
|
||||
} else if (AuthorizeConfiguration.canCommunityAdminPerformItemDeletion()) {
|
||||
adminObject = community;
|
||||
}
|
||||
} else {
|
||||
if (AuthorizeConfiguration.canCollectionAdminManageTemplateItem()) {
|
||||
adminObject = collection;
|
||||
} else if (AuthorizeConfiguration.canCommunityAdminManageCollectionTemplateItem()) {
|
||||
adminObject = community;
|
||||
}
|
||||
}
|
||||
adminObject = item;
|
||||
break;
|
||||
case Constants.WRITE:
|
||||
// if it is a template item we need to check the
|
||||
|
Reference in New Issue
Block a user