In ACS 6.2 I have created a policy onAddCocument to change the owner of the document when uploaded. It is working fine in ACS.
This policy caused issue while I deployed the governance services and tried to create a record by uploading a file.
It threw error message
Caused by: org.alfresco.repo.security.permissions.AccessDeniedException: 07270043 Access Denied. You do not have the appropriate permissions to perform this operation.
in the logs pointing the code where the following line is written:
serviceRegistry.getOwnableService().setOwner(nodeRef, "admin");
Please, let me know if there is any clue on this.
Try With runas system or admin.
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Void>() { public Void doWork() { return null; } }, AuthenticationUtil.getSystemUserName());
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.