mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
MNT-10404: Runas problem in workflow when package contains versioned content due to versioning ignoring the runas user.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@55164 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -532,8 +532,20 @@ public class VersionableAspect implements ContentServicePolicies.OnContentUpdate
|
||||
*/
|
||||
private void createVersionImpl(NodeRef nodeRef, Map<String, Serializable> versionProperties)
|
||||
{
|
||||
recordCreateVersion(nodeRef, null);
|
||||
this.versionService.createVersion(nodeRef, versionProperties);
|
||||
final VersionService vs = this.versionService;
|
||||
final NodeRef nf = nodeRef;
|
||||
final Map<String, Serializable> vp = versionProperties;
|
||||
|
||||
AuthenticationUtil.runAs(new RunAsWork<Void>() {
|
||||
|
||||
@Override
|
||||
public Void doWork() throws Exception {
|
||||
recordCreateVersion(nf, null);
|
||||
vs.createVersion(nf, vp);
|
||||
return null;
|
||||
}
|
||||
},AuthenticationUtil.getRunAsUser());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user