Owner permission removal... How?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2008 04:15 PM
I need to, simply, remove the ability to edit and delete a content item from its owner once it has been copied into a folder.
I used this thread to run a simple JavaScript on a new content item when it is added to the folder. This JavaScript contains the following two lines only:
However, I receive an error that 'setPermissions' can not be found.
Any ideas/suggestions? What am I doing wrong? Is there a list of the available JavaScript functions? Is there a better way to do what I want to do?
I used this thread to run a simple JavaScript on a new content item when it is added to the folder. This JavaScript contains the following two lines only:
document.setPermissions("Consumer", "GROUP_EVERYONE");document.setInheritsPermissions(false);
However, I receive an error that 'setPermissions' can not be found.
Any ideas/suggestions? What am I doing wrong? Is there a list of the available JavaScript functions? Is there a better way to do what I want to do?
Labels:
- Labels:
-
Archive
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2008 01:15 AM
The method is wrong. This is code working for me:
var resource = bpm_package.children[j];resource.setPermission("Coordinator", user.properties.userName);
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2008 04:01 PM
OK, so here's what I've tried:
remove_perms.js
permissionDefinitions.xml
I then created a rule that, for any content added to an area, executes the remove_perms.js script above.
I receive the following error from Alfresco when adding content:
remove_perms.js
document.setPermission("Consumer", "GROUP_EVERYONE");document.setInheritsPermissions(false);
permissionDefinitions.xml
<!– For now, owners can always see, find and manipulate their stuff –>[b]<!–[/b] <globalPermission permission="FullControl" authority="ROLE_OWNER"/> [b]–>[/b]
I then created a rule that, for any content added to an area, executes the remove_perms.js script above.
I receive the following error from Alfresco when adding content:
A system error happened during the operation: Failed to execute script 'workspace://SpacesStore/1b68fcea-af12-45db-8bd8-2a9f54f8b3a2': Failed to execute script 'workspace://SpacesStore/1b68fcea-af12-45db-8bd8-2a9f54f8b3a2': Wrapped org.alfresco.repo.security.permissions.AccessDeniedException: Access Denied. You do not have the appropriate permissions to perform this operation. (AlfrescoScript#1)

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2008 09:12 PM
OK! You haven't permission for Invite user into resource. Try with permission "Coordinator" instead of "Consumer".
