mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-11 12:03:09 +00:00
DS-3446: Remove policies only after the bitstream has been updated (otherwise the current user has not WRITE rights)
This commit is contained in:
@@ -254,13 +254,13 @@ public class BitstreamServiceImpl extends DSpaceObjectServiceImpl<Bitstream> imp
|
|||||||
bundle.getBitstreams().remove(bitstream);
|
bundle.getBitstreams().remove(bitstream);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove policies
|
|
||||||
authorizeService.removeAllPolicies(context, bitstream);
|
|
||||||
|
|
||||||
// Remove bitstream itself
|
// Remove bitstream itself
|
||||||
bitstream.setDeleted(true);
|
bitstream.setDeleted(true);
|
||||||
update(context, bitstream);
|
update(context, bitstream);
|
||||||
|
|
||||||
|
// Remove policies only after the bitstream has been updated (otherwise the current user has not WRITE rights)
|
||||||
|
authorizeService.removeAllPolicies(context, bitstream);
|
||||||
|
|
||||||
//Remove all bundles from the bitstream object, clearing the connection in 2 ways
|
//Remove all bundles from the bitstream object, clearing the connection in 2 ways
|
||||||
bundles.clear();
|
bundles.clear();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user