AnsweredAssumed Answered

Show an action according to the custom role

Question asked by sergi.l on Jun 16, 2009
Latest reply on Jun 17, 2009 by sergi.l
Hi all!

I have defined my own custom roles to link each user group to the corresponding authorization.
There is a group that is only able to navigate and see content.
There is another group that is only able to navigate and see content, and able to execute a custom action (my print action).

So I have created my custom roles as:
<permissionSet type="cm:cmobject" expose="selected">
   <permissionGroup name="MyCustomRoleOnlyRead" allowFullControl="false" expose="true" >
          <includePermissionGroup permissionGroup="Read" type="sys:base" />
      </permissionGroup>

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

I have added them to type="cm:content" and type="cm:folder" as:

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

And then I assign the custom roles to the action:
<action id="myAction">
            <permissions>
               <permission allow="false">MyCustomRoleOnlyRead</permission>
               <permission allow="true">MyCustomRoleOnlyReadAndPrint</permission>
            </permissions>
            <label-id>printDoc</label-id>
            <image>/sos/images/icons/icon.gif</image>
            <href>/wcs/sos/myscript?node=#{actionContext.nodeRef}</href>
      </action>

Finally, I assign to the user one role and later the other, and the result is the same. The action is not available for none of them!!
How the action has to be defined for this purpose?? I haven't found information about adding two or more permissions to the action node! Are they correctly added?
Many thanks!

Sergi

Outcomes