mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge branch 'feature-2.4/RM-3300' into 'release/V2.4'
Feature 2.4/rm 3300 Run code as system See merge request !265
This commit is contained in:
@@ -159,8 +159,17 @@ public class RecordAspect extends AbstractDisposableItem
|
||||
// Deal with versioned records
|
||||
if (reference.equals(CUSTOM_REF_VERSIONS))
|
||||
{
|
||||
// Apply the versioned aspect to the from node
|
||||
nodeService.addAspect(fromNodeRef, ASPECT_VERSIONED_RECORD, null);
|
||||
// run as system, to apply the versioned aspect to the from node
|
||||
// as we can't be sure if the user has add aspect rights
|
||||
authenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
{
|
||||
nodeService.addAspect(fromNodeRef, ASPECT_VERSIONED_RECORD, null);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Execute script if for the reference event
|
||||
|
Reference in New Issue
Block a user