Changing owner at node creation caused issue while adding records in governance services
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2021 07:23 AM
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.
Regards,
Kintu
Kintu
Labels:
- Labels:
-
Alfresco Content Services
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2021 11:08 PM
Try With runas system or admin.
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Void>() { public Void doWork() { return null; } }, AuthenticationUtil.getSystemUserName());
