Hi,
Rehare-custom-config.xml
I'm trying to find a way to dynamically enable/disable a "create content" menu option in the Share repository task bar. Hopefully I can create a user group that can allow use of this command, if the user isn't part of the group then the option is not displayed.
This is a custom content type that has already been defined & is in use successfully so everything is already in place, all I need is some way to disable it if required.
I assumed that using an evaluator in the same way as with actions would suffice but they don't seem to be triggered for the menu items.
<config evaluator="string-compare" condition="DocumentLibrary">
<create-content>
<content id="plain-text" mimetype="text/plain" label="some text" itemid="model:customtype" icon="icon">
<evaluator>evaluator.never.gets.fired.it.seems</evaluator>
</content>
</create-content>
<types>
<type name="cm:content">
<subtype name="model:customtype" />
</type>
<type name="cm:folder">
</type>
</types>
</config>
Any pointers would be appreciated.
Solved! Go to Solution.
You could simply override the create-content group as empty in the default share-config-custom.xml and then have a Surf Extension module add in the elements that you want. A Surf extension module can be configured with an evaluator based on group membership of the current user, and that way you can group all create-content items under one evaluator. I do not believe that the create-content elements themselves even support the evaluator element, since they are never dynamically processed like e.g. metadata templates and actions are.
You could simply override the create-content group as empty in the default share-config-custom.xml and then have a Surf Extension module add in the elements that you want. A Surf extension module can be configured with an evaluator based on group membership of the current user, and that way you can group all create-content items under one evaluator. I do not believe that the create-content elements themselves even support the evaluator element, since they are never dynamically processed like e.g. metadata templates and actions are.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.