cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco evaluator doclib action for particular group of users

santoshbaradwaj
Champ in-the-making
Champ in-the-making
HI all,

I have a requirement,
In document library actions myCustomAction should display to particular group of users only.
for this is how to implement or use elevator.


thanks in advance…

san..
6 REPLIES 6

afaust
Legendary Innovator
Legendary Innovator
Hello,

please take a look at the <a href="http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/concepts/doclib-web-tier.html">official documentation</a> and this <a href="wiki.alfresco.com/wiki/Document_Library_Predefined_Evaluators">wiki page about predefined evaluators</a> to familiarize yourself on the evaluator approach and how out-of-the-box evaluators have been implemented, which should give you a fairly good idea how to solve your requirement.
Hint: Your evaluator needs to call the repository (see RemoteClient / ConnectorService) to retrieve all members of a configured group and check if the current user is contained therein.

Regards
Axel

Hi AFaust,
Thanks for your replay..
how can I pass my group name to evaluator.
Is there any way with in the evaluator tag(like any attribute which takes the string value as parameter).

Thanks in advance.

mitpatoliya
Star Collaborator
Star Collaborator
You can pass it this way


<bean id="custom.evaluator.doclib.action.isMyGroupManager" parent="evaluator.doclib.action.groupMembership">
      <property name="groups">
         <list>
            <value>YourGroupName</value>
         </list>
      </property>
   </bean>

Thanks Mits,
Thats ok, I am asking about with in EVALUATOR tag  it self is there any way..?

mitpatoliya
Star Collaborator
Star Collaborator
You can use one I have posted to achieve your requiremnt. Why it is necessary to pass it in Evaluator tag?

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

I have a similar requirement,
to only show certain action to administrator and my group only.
here's my custom evaluator


<bean id="my.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>

this works fine for alfresco administrators group but it doesn't work for document controller group that I created.
any clue where I did wrong??

thanks in advance.

Nathan M.