mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
55eba18a47
commit
09d5f6fcc9
@@ -278,7 +278,7 @@ public class BitstreamServiceImpl extends DSpaceObjectServiceImpl<Bitstream> imp
|
||||
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())) {
|
||||
if (bitstream.equals(bundle.getPrimaryBitstream())) {
|
||||
bundle.unsetPrimaryBitstreamID();
|
||||
}
|
||||
bundle.removeBitstream(bitstream);
|
||||
|
@@ -517,7 +517,8 @@ public class BundleTest extends AbstractDSpaceObjectTest {
|
||||
* Test removeBitstream method and also the unsetPrimaryBitstreamID method, of class Bundle.
|
||||
*/
|
||||
@Test
|
||||
public void testRemoveBitstreamAuthAndUnsetPrimaryBitstreamID() throws IOException, SQLException, AuthorizeException {
|
||||
public void testRemoveBitstreamAuthAndUnsetPrimaryBitstreamID()
|
||||
throws IOException, SQLException, AuthorizeException {
|
||||
// Allow Item WRITE permissions
|
||||
doNothing().when(authorizeServiceSpy).authorizeAction(context, item, Constants.WRITE);
|
||||
// Allow Bundle ADD permissions
|
||||
|
Reference in New Issue
Block a user