cancel
Showing results for 
Search instead for 
Did you mean: 

Role creation

juliocoelho
Champ in-the-making
Champ in-the-making
Hello,

I need to create a role that allows a user to enter a space and read the children spaces, but can't see the files inside the space.

Regards,
Júlio
2 REPLIES 2

jbarmash
Champ in-the-making
Champ in-the-making
You'll have to create a custom role through the permissionDefinitions.xml file.    This should not be hard, but does involve understanding how the roles are created and how they work on a pretty detailed level.

Please study the documentation underneath the Security Category:
   http://wiki.alfresco.com/wiki/CategorySmiley Frustratedecurity

Here is an example of roles:
  http://wiki.alfresco.com/wiki/PermissionModelDefintionExample
  http://wiki.alfresco.com/wiki/Default_Permissions_Model_Reference

juliocoelho
Champ in-the-making
Champ in-the-making
I've tried to create a new Role called xxx, using the following steps:

1st added the following in the permissionsDefinition.xml

      <permissionGroup name="ReadSpaces"  expose="true" allowFullControl="false">
           <includePermissionGroup type="sys:base" permissionGroup="ReadProperties"/>
           <includePermissionGroup type="sys:base" permissionGroup="ReadChildren"/>
      </permissionGroup>

If you notice I've removed the ReadContent permission and then added the Browsing Role for the cm:cmobject

  <permissionSet type="cm:cmobject" expose="selected">
  …
      <permissionGroup name="Browsing" allowFullControl="false" expose="true" >
          <includePermissionGroup permissionGroup="ReadSpaces" type="sys:base" />
      </permissionGroup>
   </permissionSet>

and the Browsing Role for the cm:content

   <permissionSet type="cm:content" expose="selected">
       …
       <permissionGroup name="Browsing" extends="true" expose="true"/>
   </permissionSet>

Restart the Alfresco Server and if a user only has the Browsing Role on a specif space he still can see the contents of that folder, the idea was to enable the user of that role to browse the space and subspaces without see the contents that the folder has.

Regards,
Júlio