cancel
Showing results for 
Search instead for 
Did you mean: 

custom role same as editor except 'edit details'

jeyaa
Champ in-the-making
Champ in-the-making
Hi all,
I am using alfresco for past 3 weeks and right now am working with roles and permissions.
My task is to create a new customRole called CopyEditor which has to perform same as editor ie., My new custom role must have to "See folder/content, Edit content(checkout)" and should not edit the details of the content which editor does. So Is this possible to customize like this in permissionDefinitions.xml or have to write java code or something.

What I did so far was, had created a new Custom role and did some changes to edit the content and not properties.



      <!– same as write permission, but excluded the WriteProperties permissionGroup–>
      <permissionGroup name="WriteOnlyContent" expose="true" allowFullControl="false">
          <includePermissionGroup type="sys:base" permissionGroup="WriteContent"/>
      </permissionGroup> 

 <permissionGroup name="CustomRole"  expose="true" allowFullControl="false" >
         <includePermissionGroup type="cm:cmobject" permissionGroup="Consumer"/>
         <includePermissionGroup type="sys:base" permissionGroup="WriteOnlyContent"/>
         <includePermissionGroup type="cm:lockable" permissionGroup="CheckOut"/>
         <includePermissionGroup type="sys:base" permissionGroup="ReadPermissions"/>
      </permissionGroup>

role has been created, but in the UI for the CopyEditor space I am not able to checkout the file. The approach I performed is right or what should I do to make this work?


Thanks.
2 REPLIES 2

jeyaa
Champ in-the-making
Champ in-the-making
I've tried with the above problem and did the following changes

      <permissionGroup name="CustomRole"  expose="true" allowFullControl="false" >
         <includePermissionGroup type="cm:cmobject" permissionGroup="Consumer"/>
         <includePermissionGroup type="sys:base" permissionGroup="WriteContent"/>
         <includePermissionGroup type="cm:lockable" permissionGroup="CheckOut"/>
         <includePermissionGroup type="sys:base" permissionGroup="ReadPermissions"/>
      </permissionGroup>

      <permission name="_Lock" requiresType="false" expose="false">
        <grantedToGroup permissionGroup="Lock" />
         <!–requiredPermission on="node" type="sys:base"  name="Write"/–> <!–Commented –>
      </permission>

After this change I will be able to only checkout the file and not edit properties.

Actually I have modified the lock permission which is built in, If I want to write custom lock kind of thing, what should I do?. Or else is there any other method to achieve the same thing what am looking for?
And also, I will be able to Add content/space for the new role. So how could I get rid of that one?

Thanks.

rhoefer
Champ in-the-making
Champ in-the-making
Check out web-client-config-actions.xml. I do not have a clear understanding of how this works, but from what it looks like to me you may be able to do something like that here.

         <!– Create content –>
         <action id="create_content">
            <permissions>
               <permission allow="true">CreateChildren</permission>
            </permissions>
            <label-id>create_content</label-id>
            <image>/images/icons/new_content.gif</image>
            <action>wizard:createContent</action>
         </action>