Use of node.setPermission

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2014 09:24 AM
I have written the code
node.setPermission("AdminRole", user);
in java backed webscript
When i logged in as admin the above code executes fine.
But it fails for non-admin users with exception : Access Denied. You do not have the appropriate permissions to perform this operation.
How I can make it possible for non admin user.
Suggest !
node.setPermission("AdminRole", user);
in java backed webscript
When i logged in as admin the above code executes fine.
But it fails for non-admin users with exception : Access Denied. You do not have the appropriate permissions to perform this operation.
How I can make it possible for non admin user.
Suggest !
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2014 03:36 AM
To execute this code, the authenticated user needs to have ChangePermissions permission.
You can use an AuthenticationUtil.runAs with system user to solve your problem. You can find examples in the source code of Alfresco.
You can use an AuthenticationUtil.runAs with system user to solve your problem. You can find examples in the source code of Alfresco.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2014 03:01 AM
AuthenticationUtil.runAs will work for java only.
I want the solution in javascript.
Is there any way by which i can use AuthenticationUtil.runAsSystem in javascript ?
Thanks !
I want the solution in javascript.
Is there any way by which i can use AuthenticationUtil.runAsSystem in javascript ?
Thanks !
