mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-12 12:33:18 +00:00
[DS-261] Community Admin JSPUI: porting of the DS-228 patch
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4196 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -2125,6 +2125,14 @@ public class Item extends DSpaceObject
|
||||
*/
|
||||
public void move (Collection from, Collection to) throws SQLException, AuthorizeException, IOException
|
||||
{
|
||||
// Check authorisation on the item before that the move occur
|
||||
// otherwise we will need edit permission on the "target collection" to archive our goal
|
||||
// only do write authorization if user is not an editor
|
||||
if (!canEdit())
|
||||
{
|
||||
AuthorizeManager.authorizeAction(ourContext, this, Constants.WRITE);
|
||||
}
|
||||
|
||||
// Move the Item from one Collection to the other
|
||||
to.addItem(this);
|
||||
from.removeItem(this);
|
||||
@@ -2133,7 +2141,9 @@ public class Item extends DSpaceObject
|
||||
if (isOwningCollection(from))
|
||||
{
|
||||
setOwningCollection(to);
|
||||
ourContext.turnOffAuthorisationSystem();
|
||||
update();
|
||||
ourContext.restoreAuthSystemState();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user