mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-16 06:23:10 +00:00
Merge pull request #2940 from atmire/w2p-72492_authorization-feature-for-edit-item-in-REST
Features endpoint - Edit item permissions in REST
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