<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Disable copy action based on node type in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/disable-copy-action-based-on-node-type/m-p/135684#M36466</link>
    <description>&lt;P&gt;You can make use of evaluators to disable the action on the custom types of your choice. You can make use of&amp;nbsp;"evaluator.doclib.action.nodeType" predefined evaluator and pass the list of custom type (s) you want to include.&lt;/P&gt;
&lt;P&gt;Refer these docs:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.alfresco.com/5.2/concepts/doclib-predefined-evaluators-reference.html" target="_blank" rel="noopener nofollow noreferrer"&gt;https://docs.alfresco.com/5.2/concepts/doclib-predefined-evaluators-reference.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.alfresco.com/5.2/concepts/dev-extensions-share-evaluators.html" target="_blank" rel="noopener nofollow noreferrer"&gt;https://docs.alfresco.com/5.2/concepts/dev-extensions-share-evaluators.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;e.g.&lt;/P&gt;
&lt;P&gt;Action config in share-config-custom.xml would be like:&lt;/P&gt;

&lt;PRE&gt;&amp;lt;action id="document-copy-to" type="javascript" label="actions.document.copy-to"&amp;gt;
   &amp;lt;param name="function"&amp;gt;onActionCopyTo&amp;lt;/param&amp;gt;
   &amp;lt;evaluator&amp;gt;evaluator.doclib.action.editableByCurrentUser&amp;lt;/evaluator&amp;gt;&lt;BR /&gt;&lt;STRONG&gt;   &amp;lt;evaluator negate="true"&amp;gt;evaluator.doclib.action.customTypes&amp;lt;/evaluator&amp;gt;
&lt;/STRONG&gt;&amp;lt;/action&amp;gt;&lt;/PRE&gt;
&lt;P&gt;share&amp;nbsp;custom-slingshot-context&amp;nbsp; defined the bean :&lt;/P&gt;
&lt;PRE&gt;&amp;lt;bean id="&lt;STRONG&gt;evaluator.doclib.action.customTypes&lt;/STRONG&gt;" parent="evaluator.doclib.action.nodeType"&amp;gt;
      &amp;lt;property name="types"&amp;gt;
         &amp;lt;list&amp;gt;
&lt;STRONG&gt;            &amp;lt;value&amp;gt;demo:customType1&amp;lt;/value&amp;gt;&lt;BR /&gt;            &amp;lt;value&amp;gt;demo:customType2&amp;lt;/value&amp;gt;
&lt;/STRONG&gt;         &amp;lt;/list&amp;gt;
      &amp;lt;/property&amp;gt;
   &amp;lt;/bean&amp;gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 21 Jan 2021 12:42:11 GMT</pubDate>
    <dc:creator>abhinavmishra14</dc:creator>
    <dc:date>2021-01-21T12:42:11Z</dc:date>
    <item>
      <title>Disable copy action based on node type</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/disable-copy-action-based-on-node-type/m-p/135683#M36465</link>
      <description>&lt;P&gt;Hi all, is there a way to disable the default copy action of alfresco-share for only a custom type of node?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 12:11:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/disable-copy-action-based-on-node-type/m-p/135683#M36465</guid>
      <dc:creator>zlucy82</dc:creator>
      <dc:date>2021-01-21T12:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: Disable copy action based on node type</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/disable-copy-action-based-on-node-type/m-p/135684#M36466</link>
      <description>&lt;P&gt;You can make use of evaluators to disable the action on the custom types of your choice. You can make use of&amp;nbsp;"evaluator.doclib.action.nodeType" predefined evaluator and pass the list of custom type (s) you want to include.&lt;/P&gt;
&lt;P&gt;Refer these docs:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.alfresco.com/5.2/concepts/doclib-predefined-evaluators-reference.html" target="_blank" rel="noopener nofollow noreferrer"&gt;https://docs.alfresco.com/5.2/concepts/doclib-predefined-evaluators-reference.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.alfresco.com/5.2/concepts/dev-extensions-share-evaluators.html" target="_blank" rel="noopener nofollow noreferrer"&gt;https://docs.alfresco.com/5.2/concepts/dev-extensions-share-evaluators.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;e.g.&lt;/P&gt;
&lt;P&gt;Action config in share-config-custom.xml would be like:&lt;/P&gt;

&lt;PRE&gt;&amp;lt;action id="document-copy-to" type="javascript" label="actions.document.copy-to"&amp;gt;
   &amp;lt;param name="function"&amp;gt;onActionCopyTo&amp;lt;/param&amp;gt;
   &amp;lt;evaluator&amp;gt;evaluator.doclib.action.editableByCurrentUser&amp;lt;/evaluator&amp;gt;&lt;BR /&gt;&lt;STRONG&gt;   &amp;lt;evaluator negate="true"&amp;gt;evaluator.doclib.action.customTypes&amp;lt;/evaluator&amp;gt;
&lt;/STRONG&gt;&amp;lt;/action&amp;gt;&lt;/PRE&gt;
&lt;P&gt;share&amp;nbsp;custom-slingshot-context&amp;nbsp; defined the bean :&lt;/P&gt;
&lt;PRE&gt;&amp;lt;bean id="&lt;STRONG&gt;evaluator.doclib.action.customTypes&lt;/STRONG&gt;" parent="evaluator.doclib.action.nodeType"&amp;gt;
      &amp;lt;property name="types"&amp;gt;
         &amp;lt;list&amp;gt;
&lt;STRONG&gt;            &amp;lt;value&amp;gt;demo:customType1&amp;lt;/value&amp;gt;&lt;BR /&gt;            &amp;lt;value&amp;gt;demo:customType2&amp;lt;/value&amp;gt;
&lt;/STRONG&gt;         &amp;lt;/list&amp;gt;
      &amp;lt;/property&amp;gt;
   &amp;lt;/bean&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Jan 2021 12:42:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/disable-copy-action-based-on-node-type/m-p/135684#M36466</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2021-01-21T12:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: Disable copy action based on node type</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/disable-copy-action-based-on-node-type/m-p/135685#M36467</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/74498"&gt;@abhinavmishra14&lt;/A&gt;, thank you very much for your reply, it works perfectly and disable action for all roles! Now, i would to manage the action (with id "onActionCopyTo") item menu of "&amp;lt;multi-select&amp;gt;" element in DocumentLibrary of Share, i would to get the same result, so, that this action will be visible for all node type except my custom node type. Have you any ideas? Thank you!&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is a picture:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Schermata 2021-03-09 alle 13.17.11.png" style="width: 257px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/959i977616B9C23691A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 12:18:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/disable-copy-action-based-on-node-type/m-p/135685#M36467</guid>
      <dc:creator>zlucy82</dc:creator>
      <dc:date>2021-03-09T12:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Disable copy action based on node type</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/disable-copy-action-based-on-node-type/m-p/135686#M36468</link>
      <description>&lt;P&gt;Unfortulately, you can't control multi select menu using evaluators. you have to customize the &lt;A href="https://github.com/Alfresco/share/blob/develop/share/src/main/webapp/components/documentlibrary/toolbar.js" target="_self" rel="nofollow noopener noreferrer"&gt;toolbar.js&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You would have to look at this function to check for custom type check implementation:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Alfresco/share/blob/develop/share/src/main/webapp/components/documentlibrary/toolbar.js#L1449" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/Alfresco/share/blob/develop/share/src/main/webapp/components/documentlibrary/toolbar.js#L1449&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 13:05:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/disable-copy-action-based-on-node-type/m-p/135686#M36468</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2021-03-22T13:05:42Z</dc:date>
    </item>
  </channel>
</rss>

