add bundle remove authorization

(cherry picked from commit 3255e073fa)
This commit is contained in:
Paulo Graça
2023-10-19 09:58:24 +01:00
committed by github-actions[bot]
parent 7ec5f7ec8a
commit 7ab1d39671

View File

@@ -276,6 +276,7 @@ public class BitstreamServiceImpl extends DSpaceObjectServiceImpl<Bitstream> imp
//Remove our bitstream from all our bundles
final List<Bundle> bundles = bitstream.getBundles();
for (Bundle bundle : bundles) {
authorizeService.authorizeAction(context, bundle, Constants.REMOVE);
//We also need to remove the bitstream id when it's set as bundle's primary bitstream
if(bitstream.equals(bundle.getPrimaryBitstream())) {
bundle.unsetPrimaryBitstreamID();