cancel
Showing results for 
Search instead for 
Did you mean: 

predefined evaluator wont work

michaelp
Confirmed Champ
Confirmed Champ
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.
3 REPLIES 3

jpotts
World-Class Innovator
World-Class Innovator
Try changing your group value to GROUP_MYCOMP_MITARBEITER.

Jeff

EDIT: I thought this is the solution but this wont work either -.-

dswenson
Champ in-the-making
Champ in-the-making
Had the same issue. Adding the "GROUP_" in front of the group id seems to have worked.