Hi all, is there a way to disable the default copy action of alfresco-share for only a custom type of node?
You can make use of evaluators to disable the action on the custom types of your choice. You can make use of "evaluator.doclib.action.nodeType" predefined evaluator and pass the list of custom type (s) you want to include.
Refer these docs:
https://docs.alfresco.com/5.2/concepts/doclib-predefined-evaluators-reference.html
https://docs.alfresco.com/5.2/concepts/dev-extensions-share-evaluators.html
e.g.
Action config in share-config-custom.xml would be like:
<action id="document-copy-to" type="javascript" label="actions.document.copy-to"> <param name="function">onActionCopyTo</param> <evaluator>evaluator.doclib.action.editableByCurrentUser</evaluator>
<evaluator negate="true">evaluator.doclib.action.customTypes</evaluator> </action>
share custom-slingshot-context defined the bean :
<bean id="evaluator.doclib.action.customTypes" parent="evaluator.doclib.action.nodeType"> <property name="types"> <list> <value>demo:customType1</value>
<value>demo:customType2</value> </list> </property> </bean>
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.