mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-7068 updates from review
This commit is contained in:
@@ -552,14 +552,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
|
|||||||
*/
|
*/
|
||||||
private void checkPermissionsForDeleteHold(NodeRef hold)
|
private void checkPermissionsForDeleteHold(NodeRef hold)
|
||||||
{
|
{
|
||||||
List<NodeRef> held = AuthenticationUtil.runAsSystem(new RunAsWork<List<NodeRef>>()
|
List<NodeRef> held = AuthenticationUtil.runAsSystem(() -> getHeld(hold));
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public List<NodeRef> doWork()
|
|
||||||
{
|
|
||||||
return getHeld(hold);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
List<String> heldNames = new ArrayList<>();
|
List<String> heldNames = new ArrayList<>();
|
||||||
for (NodeRef nodeRef : held)
|
for (NodeRef nodeRef : held)
|
||||||
|
@@ -320,7 +320,7 @@ public class HoldServiceImplUnitTest extends BaseUnitTest
|
|||||||
// TODO check interactions with policy component!!!
|
// TODO check interactions with policy component!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test (expected = AlfrescoRuntimeException.class)
|
@Test (expected = AccessDeniedException.class)
|
||||||
public void deleteHoldNoPermissionsOnContent()
|
public void deleteHoldNoPermissionsOnContent()
|
||||||
{
|
{
|
||||||
mockPoliciesForDeleteHold();
|
mockPoliciesForDeleteHold();
|
||||||
|
Reference in New Issue
Block a user