AnsweredAssumed Answered

predefined evaluator wont work

Question asked by michaelp on Jul 6, 2014
Latest reply on Aug 13, 2014 by dswenson
Alfresco 4.2.2

Hi, I cant get the evaluator working.

Here my share-config-custom.xml

<?xml version="1.0" encoding="UTF-8"?>
<alfresco-config>

    <!– shows the email action on share –>
   <config evaluator="string-compare" condition="DocLibActions">
        <actions>
           <action id="doclib.action.azm"
                 icon="azm"
                 type="javascript"
                 label="action.azm">
                 <param name="function">onActionHandIn</param>
                 <param name="successMessage">message.success</param>
                 <param name="failureMessage">message.failure</param>
                 <evaluator>evaluator.doclib.action.isMemberOfMycomp</evaluator>
           </action>
        </actions>
       
        <!– defines the action to be shown in document-details and the repository-browser –>
      <actionGroups>
            <actionGroup id="document-browse">
                <action index="400" id="doclib.action.azm"/>
            </actionGroup>
            <actionGroup id="document-details">
                <action index="400" id="doclib.action.azm"/>
            </actionGroup>
        </actionGroups>
    </config>
   
    <config evaluator="string-compare" condition="DocLibCustom">
        <dependencies>
            <js src="components/documentlibrary/azm-action.js"/>
        </dependencies>
    </config>
   
</alfresco-config>


And my custom-slingshot-application-context.xml

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

   <!– Add application extension messages –>
   <bean id="resources" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
      <property name="resourceBundles">
         <list>
               <value>alfresco.messages.azm</value>
         </list>
      </property>
   </bean>

   <bean id="evaluator.doclib.action.isMemberOfMycomp" parent="evaluator.doclib.action.groupMembership">
      <property name="groups">
         <list>
            <value>GROUP_MYCOMP_MITARBEITER</value>
         </list>
      </property>
   </bean>

</beans>


Both files are in web-extension folder in maven project. Can someone help me please? I cant find any errors. The log stays empty. The Action wont show up, no matter if the user is a member of the specified group. The group has the id MYCOMP_MITARBEITER and the description MYCOMP Mitarbeiter. If a remove the evaluator the action is available.

Outcomes