mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-10 03:23:13 +00:00
[DS-562] Community admin or user with WRITE, ADD and ADMIN policy on collection cannot delete that collection due to bug in AuthorizeUtil.authorizeManageTemplateItem(context,collection)
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5703 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -307,7 +307,7 @@ public class AuthorizeUtil
|
|||||||
: null;
|
: null;
|
||||||
AuthorizeManager.authorizeAction(context, parent, Constants.ADMIN);
|
AuthorizeManager.authorizeAction(context, parent, Constants.ADMIN);
|
||||||
}
|
}
|
||||||
else if (!AuthorizeManager.isAdmin(context))
|
else if (!isAuthorized && !AuthorizeManager.isAdmin(context))
|
||||||
{
|
{
|
||||||
throw new AuthorizeException(
|
throw new AuthorizeException(
|
||||||
"You are not authorized to create a template item for the collection");
|
"You are not authorized to create a template item for the collection");
|
||||||
|
@@ -915,10 +915,14 @@ public class Collection extends DSpaceObject
|
|||||||
log.info(LogManager.getHeader(ourContext, "remove_template_item",
|
log.info(LogManager.getHeader(ourContext, "remove_template_item",
|
||||||
"collection_id=" + getID() + ",template_item_id="
|
"collection_id=" + getID() + ",template_item_id="
|
||||||
+ template.getID()));
|
+ template.getID()));
|
||||||
|
// temporary turn off auth system, we have already checked the permission on the top of the method
|
||||||
|
// check it again will fail because we have already broken the relation between the collection and the item
|
||||||
|
ourContext.turnOffAuthorisationSystem();
|
||||||
template.delete();
|
template.delete();
|
||||||
|
ourContext.restoreAuthSystemState();
|
||||||
template = null;
|
template = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
ourContext.addEvent(new Event(Event.MODIFY, Constants.COLLECTION, getID(), "remove_template_item"));
|
ourContext.addEvent(new Event(Event.MODIFY, Constants.COLLECTION, getID(), "remove_template_item"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -12,6 +12,7 @@
|
|||||||
(Andrea Bollini)
|
(Andrea Bollini)
|
||||||
- [DS-585] The Content Disposition configuration is ignored by unpublished items
|
- [DS-585] The Content Disposition configuration is ignored by unpublished items
|
||||||
- [DS-704] Update pdfbox library to improve performance and out-of-box support for pdf extraction
|
- [DS-704] Update pdfbox library to improve performance and out-of-box support for pdf extraction
|
||||||
|
- [DS-562] Community admin or user with WRITE, ADD and ADMIN policy on collection cannot delete that collection due to bug in AuthorizeUtil.authorizeManageTemplateItem(context,collection)
|
||||||
|
|
||||||
(Reinhard Engels)
|
(Reinhard Engels)
|
||||||
- [DS-637] Browse index bug/fix ONLY for authority index: first "too low" confidence value stop current item metadata to be indexed in the autority index
|
- [DS-637] Browse index bug/fix ONLY for authority index: first "too low" confidence value stop current item metadata to be indexed in the autority index
|
||||||
|
Reference in New Issue
Block a user