cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a new role in permissionDefinations.xml file?

rupanjal
Champ in-the-making
Champ in-the-making
I am using Alfresco 3.0 and i want to make a new role named "USER" who will have rights only to view and upload a document but cannot delete or edit the document.He also cant create space or content.What are the changes that are required to be made in the permissionDefinations.xml file?Do i need to change anything in any other file?
Thanks in advance……………..
4 REPLIES 4

mfoxtrot
Champ in-the-making
Champ in-the-making
You can add a new custom role according to your security requirements. You will have to include the custom role details in the permissionDefinitions.xml file, which is located at <config>\model\. For a Tomcat installation, you can find this file at tomcat\webapps\alfresco\WEB-INF\classes\alfresco\model\ permissionDefinitions.xml.
You need to define your own permissions group (say TestRole) and assign permissions as shown below:
<permissionGroup name="TestRole" allowFullControl="false" expose="true" >
<includePermissionGroup permissionGroup="Read" type="sys:base" />
<includePermissionGroup permissionGroup="AddChildren" type="sys:base"/>
<includePermissionGroup type="cm:lockable" permissionGroup="CheckOut"/>
</permissionGroup>
Once you make the changes to the XML file, you need to restart Alfresco to have the new role added to the system.

kalpeshforecm
Champ in-the-making
Champ in-the-making
Will Consumer role not be sufficient for you? If not follow the below steps.

As mentioned by mfoxtrot, create permission group as below in <<ALFRESCO_HOME>>\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\model\ permissionDefinitions.xml

<permissionGroup name="USER" allowFullControl="false" expose="true" >
          <includePermissionGroup permissionGroup="Read" type="sys:base" />
</permissionGroup>

Also, for Alfresco 3.1, add the same permission group to the proper permission set like
   <permissionSet type="cm:content" expose="selected">  <!– For Content–>
    <permissionSet type="cm:folder" expose="selected">  <!– Or For Space–>

Also add properties label in <<ALFRESCO_HOME>>\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\messages\webclient.properties as below.

USER=USER

Restart server.

Thanks,
Kalpesh Patel

zokstuzla
Champ in-the-making
Champ in-the-making
Hello,

After creating new role accorind to your advice, I could not disable 'delete' option for user.

So, user should be able to upload documents and to view documents, but not be able to delete or update documents, even if the user is the owner of the document.

Is this possible ?


Thanks and best regards,
Zoran

zokstuzla
Champ in-the-making
Champ in-the-making
Hello all,

The only way to disable 'delete' option on certain space was to create script which changes document owner to 'admin' immediatelly after document is created or copied to this space.

The solution is not so elegant, but it works ! Now I have the users which can only create content in some spaces, not able to modify or delete it, exactly what I need.


Best,
Zoran Kuret