AnsweredAssumed Answered

Evaluator for group membership

Question asked by marcello.modica@logconsulting.it on Jun 11, 2014
Latest reply on Aug 24, 2015 by nathanm
Why this evaluator dowsn't work:

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

<beans>

   <!– Has "isoDocument:isoDocumentPublished" evaluator –>
   <bean id="com.pasello.iso.isoDocumentAspect" parent="evaluator.doclib.action.hasAspect">
      <property name="aspects">
         <list>
            <value>isoDocument:isoDocumentPublished</value>
         </list>
      </property>
   </bean>
<bean id="com.pasello.iso.isoDocumentManagers" parent="evaluator.doclib.action.groupMembership">
   <property name="relation" value="OR"/>
      <property name="groups">
         <list>
            <value>isoDocumentManagers</value>
         </list>
      </property>
   </bean>
</beans>



I need it in doclib action evaluation

<alfresco-config>

 
   <config evaluator="string-compare" condition="DocLibActions">

      <!–
         Action definitions
      –>
      <actions>
         <!– Transfor Document To PDF –>
         <action id="publish-to-ISO" type="javascript" label="Pubblica su documentazione ISO">
            <param name="function">onActionSimpleRepoAction</param>
            <!– Additional parameters for onRepoAction function  –>
            <param name="action">publish-to-ISO</param>
            <param name="successMessage">Pubblicata corrattamente sulla documentazione ISO</param>
            <param name="failureMessage">Errore di pubblicazione contattare l'amministratore del sistema</param>
            <evaluator negate="true">com.pasello.iso.isoDocumentAspect</evaluator>
            <evaluator>com.pasello.iso.isoDocumentManagers</evaluator>
         </action>
      </actions>
      <actionGroups>
          <actionGroup id="document-browse">
             <action index="460" id="publish-to-ISO"/>
          </actionGroup>
          <actionGroup id="document-details">
            <action index="400" id="publish-to-ISO"/>
          </actionGroup>
      </actionGroups>
     </config>

</alfresco-config>

Outcomes