mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
RM-5012 - run on add record policy as system
This commit is contained in:
@@ -433,11 +433,19 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
|||||||
notificationFrequency = NotificationFrequency.TRANSACTION_COMMIT
|
notificationFrequency = NotificationFrequency.TRANSACTION_COMMIT
|
||||||
)
|
)
|
||||||
public void onAddAspect(NodeRef nodeRef, QName aspect)
|
public void onAddAspect(NodeRef nodeRef, QName aspect)
|
||||||
|
{
|
||||||
|
authenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public Void doWork() throws Exception
|
||||||
{
|
{
|
||||||
if (nodeService.exists(nodeRef) && nodeService.hasAspect(nodeRef, ASPECT_RECORD))
|
if (nodeService.exists(nodeRef) && nodeService.hasAspect(nodeRef, ASPECT_RECORD))
|
||||||
{
|
{
|
||||||
generateRecordIdentifier(nodeService, identifierService, nodeRef);
|
generateRecordIdentifier(nodeService, identifierService, nodeRef);
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user