cancel
Showing results for 
Search instead for 
Did you mean: 

Evaluator for group membership issue

nathanm
Champ in-the-making
Champ in-the-making
Hi all,

I need to custom an action so its only visible to certain group of user. so I implement the evaluator for group membership.

Here is my share-config-custom.xml related to the evaluator:

    <config evaluator="string-compare" condition="DocLibActions">
        <action id="document-assign-workflow" type="javascript" label="actions.document.assign-workflow">
            <param name="function">onActionAssignWorkflow</param>
       <evaluator>evaluator.doclib.action.isManager</evaluator>
         </action>
     </config>

And here is the snippet from my context XML:

  <bean id="evaluator.doclib.action.isManager" parent="evaluator.doclib.action.groupMembership">
         <property name="relation" value="OR" />
         <property name="groups">
            <list>
               <value>GROUP_ALFRESCO_ADMINISTRATORS</value>
               <value>GROUP_Document Controller</value>
            </list>
         </property>
   </bean>

in ALFRESCO_ADMINISTRATORS I have 1 user which is admin, and in Document Controller group I have 3 user "Justin Bieber", "Nick", and "Jeff Pott".
When I logged on as admin I can see the assign workflow button which is working as expected.
When I logged on as "Justin Bieber" or "Jeff Pott" I didn't see the assign workflow button which is not what I expected based on the evaluator I created, however when I logged on as "Nick" I can see the assign workflow button as it is supposed to be.
Does username doesn't meant to be having space character in it?? or am I defining my evaluator in a wrong way??

Thanks in advance,
Nathan
2 REPLIES 2

mitpatoliya
Star Collaborator
Star Collaborator
May be "Nick" is the owner of document. Not gone to the depth of details just a pointer from my side.

nathanm
Champ in-the-making
Champ in-the-making
all 3 user have same permissions level as coordinator. I also tried to give acces to everyone as well and still had no idea what went wrong.

Thanks in advance,
Nathan M