mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-11 03:53:07 +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);
|
||||
}
|
||||
|
||||
// Remove policies
|
||||
authorizeService.removeAllPolicies(context, bitstream);
|
||||
|
||||
// Remove bitstream itself
|
||||
bitstream.setDeleted(true);
|
||||
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
|
||||
bundles.clear();
|
||||
}
|
||||
|
Reference in New Issue
Block a user