AnsweredAssumed Answered

Evaluator for group membership issue

Question asked by nathanm on Aug 25, 2015
Latest reply on Aug 26, 2015 by nathanm
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

Outcomes