Hide "Contract" content type from content create list for all users except group "Contract Managers" Alfresco Share

30 Views Asked by At

How can i hide "Contract" content type from content create list for all users except group "CONTRACT_MANAGERS". I added the config evaluator in share to add the contract to the list of documents and created evaluator extension with the group but it continues to display for all users.

share-config.xml file

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

        <create-content>

            <content id="contract" label="Contract" type="pagelink" index="1" icon="text">

                <param name="page">create-content?destination={nodeRef}&amp;itemId=udp:contract</param>

                <evaluator negate="true">za.co.udp.evaluator.doclib.action.permissionManager</evaluator>

            </content>          

        </create-content>

    </config>

application-context.xml file

<bean id="za.co.udp.evaluator.doclib.action.permissionManager" parent="evaluator.doclib.action.groupMembership">

        <property name="groups">

            <list>

                <value>GROUP_CONTRACT_MANAGERS</value>

            </list>

        </property>

</bean>

enter image description here

1

There are 1 best solutions below

1
David Dejmal On

Your configuration looks OK. But why you have negate="true" in <evaluator negate="true">? It's negative your evaluator and make right opposite of your goal. So now every user EXCEPT group GROUP_CONTRACT_MANAGERS will see this content type. Make sure too that your group ID is right GROUP_CONTRACT_MANAGERS.