mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
RM-1981 (Cant reject the record that has any version records)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.3@98191 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -168,13 +168,22 @@ public class RecordAspect extends AbstractDisposableItem
|
|||||||
kind = BehaviourKind.CLASS,
|
kind = BehaviourKind.CLASS,
|
||||||
notificationFrequency = NotificationFrequency.TRANSACTION_COMMIT
|
notificationFrequency = NotificationFrequency.TRANSACTION_COMMIT
|
||||||
)
|
)
|
||||||
public void onRemoveReference(NodeRef fromNodeRef, NodeRef toNodeRef, QName reference)
|
public void onRemoveReference(final NodeRef fromNodeRef, NodeRef toNodeRef, QName reference)
|
||||||
{
|
{
|
||||||
// Deal with versioned records
|
// Deal with versioned records
|
||||||
if (reference.equals(CUSTOM_REF_VERSIONS))
|
if (reference.equals(CUSTOM_REF_VERSIONS))
|
||||||
|
{
|
||||||
|
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public Void doWork()
|
||||||
{
|
{
|
||||||
// Apply the versioned aspect to the from node
|
// Apply the versioned aspect to the from node
|
||||||
nodeService.removeAspect(fromNodeRef, ASPECT_VERSIONED_RECORD);
|
nodeService.removeAspect(fromNodeRef, ASPECT_VERSIONED_RECORD);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Execute script if for the reference event
|
// Execute script if for the reference event
|
||||||
|
Reference in New Issue
Block a user