mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-01 14:41:46 +00:00
Merge remote-tracking branch 'remotes/origin/feature/RM-6904_PreventUpdateHeldActiveContent' into feature/RM-6914_AddRemoveToHold_Tests
This commit is contained in:
@@ -205,6 +205,8 @@ public class HoldServiceImpl extends ServiceBaseImpl
|
|||||||
List<NodeRef> frozenNodes = getHeld(hold);
|
List<NodeRef> frozenNodes = getHeld(hold);
|
||||||
for (NodeRef frozenNode : frozenNodes)
|
for (NodeRef frozenNode : frozenNodes)
|
||||||
{
|
{
|
||||||
|
//set in transaction cache in order not to trigger update policy when removing the child association
|
||||||
|
transactionalResourceHelper.getSet("frozen").add(frozenNode);
|
||||||
removeFreezeAspect(frozenNode, 1);
|
removeFreezeAspect(frozenNode, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,7 +234,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
|
|||||||
{
|
{
|
||||||
// remove the freeze aspect from the node
|
// remove the freeze aspect from the node
|
||||||
//set in transaction cache in order not to trigger update policy when removing the aspect
|
//set in transaction cache in order not to trigger update policy when removing the aspect
|
||||||
transactionalResourceHelper.getSet(nodeRef).add("frozen");
|
transactionalResourceHelper.getSet("frozen").add(nodeRef);
|
||||||
nodeService.removeAspect(nodeRef, ASPECT_FROZEN);
|
nodeService.removeAspect(nodeRef, ASPECT_FROZEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -248,7 +250,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
|
|||||||
{
|
{
|
||||||
// remove the freeze aspect from the node
|
// remove the freeze aspect from the node
|
||||||
//set in transaction cache in order not to trigger update policy when removing the aspect
|
//set in transaction cache in order not to trigger update policy when removing the aspect
|
||||||
transactionalResourceHelper.getSet(record).add("frozen");
|
transactionalResourceHelper.getSet("frozen").add(record);
|
||||||
nodeService.removeAspect(record, ASPECT_FROZEN);
|
nodeService.removeAspect(record, ASPECT_FROZEN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -730,11 +732,9 @@ public class HoldServiceImpl extends ServiceBaseImpl
|
|||||||
// run as system so we don't run into further permission issues
|
// run as system so we don't run into further permission issues
|
||||||
// we already know we have to have the correct capability to get here
|
// we already know we have to have the correct capability to get here
|
||||||
authenticationUtil.runAsSystem((RunAsWork<Void>) () -> {
|
authenticationUtil.runAsSystem((RunAsWork<Void>) () -> {
|
||||||
{
|
|
||||||
|
|
||||||
// remove from hold
|
// remove from hold
|
||||||
//set in transaction cache in order not to trigger update policy when removing the child association
|
//set in transaction cache in order not to trigger update policy when removing the child association
|
||||||
transactionalResourceHelper.getSet(nodeRef).add("frozen");
|
transactionalResourceHelper.getSet("frozen").add(nodeRef);
|
||||||
nodeService.removeChild(hold, nodeRef);
|
nodeService.removeChild(hold, nodeRef);
|
||||||
|
|
||||||
// audit that the node has been remove from the hold
|
// audit that the node has been remove from the hold
|
||||||
@@ -742,7 +742,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
|
|||||||
recordsManagementAuditService.auditEvent(nodeRef, AUDIT_REMOVE_FROM_HOLD);
|
recordsManagementAuditService.auditEvent(nodeRef, AUDIT_REMOVE_FROM_HOLD);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user