DS-3127: Process review feedback and fix tests

This commit is contained in:
Tom Desair
2017-06-22 15:01:45 +02:00
committed by Tim Donohue
parent 0ffc3c9a27
commit fcb91d6771
6 changed files with 66 additions and 42 deletions

View File

@@ -260,15 +260,15 @@ public class BitstreamServiceImpl extends DSpaceObjectServiceImpl<Bitstream> imp
bundle.getBitstreams().remove(bitstream);
}
//Remove all bundles from the bitstream object, clearing the connection in 2 ways
bundles.clear();
// 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();
}
@Override