mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
RM-1420: Impossible to close/reopen folder with frozen record
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@67243 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
<map>
|
<map>
|
||||||
<entry key="capabilityCondition.filling" value="true"/>
|
<entry key="capabilityCondition.filling" value="true"/>
|
||||||
<entry key="capabilityCondition.cutoff" value="false"/>
|
<entry key="capabilityCondition.cutoff" value="false"/>
|
||||||
<entry key="capabilityCondition.frozenOrFrozenChildren" value="false"/>
|
<entry key="capabilityCondition.frozen" value="false"/>
|
||||||
<entry key="capabilityCondition.closed" value="false"/>
|
<entry key="capabilityCondition.closed" value="false"/>
|
||||||
</map>
|
</map>
|
||||||
</property>
|
</property>
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
<map>
|
<map>
|
||||||
<entry key="capabilityCondition.filling" value="true"/>
|
<entry key="capabilityCondition.filling" value="true"/>
|
||||||
<entry key="capabilityCondition.cutoff" value="false"/>
|
<entry key="capabilityCondition.cutoff" value="false"/>
|
||||||
<entry key="capabilityCondition.frozenOrFrozenChildren" value="false"/>
|
<entry key="capabilityCondition.frozen" value="false"/>
|
||||||
<entry key="capabilityCondition.closed" value="true"/>
|
<entry key="capabilityCondition.closed" value="true"/>
|
||||||
</map>
|
</map>
|
||||||
</property>
|
</property>
|
||||||
|
@@ -432,7 +432,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
|
|||||||
* @see org.alfresco.module.org_alfresco_module_rm.hold.HoldService#addToHolds(java.util.List, org.alfresco.service.cmr.repository.NodeRef)
|
* @see org.alfresco.module.org_alfresco_module_rm.hold.HoldService#addToHolds(java.util.List, org.alfresco.service.cmr.repository.NodeRef)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void addToHolds(List<NodeRef> holds, NodeRef nodeRef)
|
public void addToHolds(final List<NodeRef> holds, final NodeRef nodeRef)
|
||||||
{
|
{
|
||||||
ParameterCheck.mandatoryCollection("holds", holds);
|
ParameterCheck.mandatoryCollection("holds", holds);
|
||||||
ParameterCheck.mandatory("nodeRef", nodeRef);
|
ParameterCheck.mandatory("nodeRef", nodeRef);
|
||||||
@@ -442,7 +442,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
|
|||||||
throw new AlfrescoRuntimeException("Can only add records or record folders to a hold.");
|
throw new AlfrescoRuntimeException("Can only add records or record folders to a hold.");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (NodeRef hold : holds)
|
for (final NodeRef hold : holds)
|
||||||
{
|
{
|
||||||
if (!isHold(hold))
|
if (!isHold(hold))
|
||||||
{
|
{
|
||||||
@@ -451,6 +451,12 @@ public class HoldServiceImpl extends ServiceBaseImpl
|
|||||||
|
|
||||||
// check that the node isn't already in the hold
|
// check that the node isn't already in the hold
|
||||||
if (!getHeld(hold).contains(nodeRef))
|
if (!getHeld(hold).contains(nodeRef))
|
||||||
|
{
|
||||||
|
// run as system to ensure we have all the appropriate premissions to perform the manipulations we require
|
||||||
|
runAsSystem(new RunAsWork<Void>()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public Void doWork() throws Exception
|
||||||
{
|
{
|
||||||
// Link the record to the hold
|
// Link the record to the hold
|
||||||
nodeService.addChild(hold, nodeRef, ASSOC_FROZEN_RECORDS, ASSOC_FROZEN_RECORDS);
|
nodeService.addChild(hold, nodeRef, ASSOC_FROZEN_RECORDS, ASSOC_FROZEN_RECORDS);
|
||||||
@@ -493,6 +499,10 @@ public class HoldServiceImpl extends ServiceBaseImpl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user