How to Define Permissions on Custom Content types?

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

How to Define Permissions on Custom Content types?

Hi,

I am using Alfresco 5.2.0 and have a custom content model deployed in it.

I want to define permissions to access Custom Content type for specific groups. (groups created by admin with Group Manager in Admin Tools).
By this a group can have read, Create or View permission on specific Custom Content Type.
How can I accomplish this ?

Thanks In Advance...!!!

1 Reply
Highlighted
Active Member II

Re: How to Define Permissions on Custom Content types?

Hello!

Maybe this question have more elegant answer, but I'd try to solve this by custom folder rule. The easy way to make this would be:

  1. write your .js script, which will be:
    1. check type of created node (JS API has function .getTypeShort() for this);
    2. if type = your custom type:
      1. disable inheritance .setInheritsPermissions(false); to avoid conflits besides your custom permissions and default Alfresco permissions. Maybe you have to disable permissions for some default .removePermission();
      2. set custom permissions by function .setPermission(); to your custom groups;
  2.  drop it in /companyhome/Data Dictionary/Scripts
  3. go to space (folder) there will be document of this type created;
  4. click "manage rules";
  5. Perform Action: execute script -> pick your script from the list