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.
Re: Enable/Disable Share create content menu option
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.