mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-14 05:23:14 +00:00
DS-2086 fix. Corrects the logic to deleting Communities & Collections such that hierarchical deletion test now succeeds. Also corrects minor permissions error in a different unit test.
This commit is contained in:
@@ -1027,15 +1027,15 @@ public class CommunityTest extends AbstractDSpaceObjectTest
|
||||
{
|
||||
new NonStrictExpectations(AuthorizeManager.class)
|
||||
{{
|
||||
// Allow current Community ADD perms
|
||||
// Allow Community ADD perms (in order to add a new subcommunity to parent)
|
||||
AuthorizeManager.authorizeAction((Context) any, (Community) any,
|
||||
Constants.ADD); result = null;
|
||||
// Allow *parent* Community ADD perms
|
||||
AuthorizeManager.authorizeActionBoolean((Context) any, (Community) any,
|
||||
Constants.ADD); result = true;
|
||||
// Allow current Community REMOVE perms
|
||||
Constants.ADD, true); result = null;
|
||||
// Allow Community REMOVE perms (needed to unmap/remove subcommunity)
|
||||
AuthorizeManager.authorizeAction((Context) any, (Community) any,
|
||||
Constants.REMOVE); result = null;
|
||||
Constants.REMOVE, true); result = null;
|
||||
// Allow Community DELETE perms (needed to actually delete subcommunity)
|
||||
AuthorizeManager.authorizeAction((Context) any, (Community) any,
|
||||
Constants.DELETE, true); result = null;
|
||||
}};
|
||||
|
||||
// Turn off authorization temporarily to create a new top-level community
|
||||
|
Reference in New Issue
Block a user