<?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 Dashlet Restriction  in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/dashlet-restriction/m-p/4078#M1714</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Developed by &lt;A href="http://about.me/emmanuel.roux" target="_blank" rel="nofollow noopener noreferrer"&gt;Emmanuel ROUX&lt;/A&gt; &lt;STRONG&gt;Please use GitHub issue tool to post issues.&lt;/STRONG&gt;&lt;/P&gt;&lt;H2&gt;Presentation&lt;/H2&gt;&lt;P&gt;This plugin allows to control the display of dashlet with restriction on:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;user(s)&lt;/LI&gt;&lt;LI&gt;group(s)&lt;/LI&gt;&lt;LI&gt;site(s)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The restriction combinaison is a logical AND. So, If you combine restrictions, for example for a site and a group, only users in the specified group and for the specific site will see the dashlet. The plugin includes a sample dashlet (Hello World Restriction) which illustrates how to control the restrictions.&lt;/P&gt;&lt;H2&gt;How to use it&lt;/H2&gt;&lt;H3&gt;Installation&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Get source form GitHub (&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://github.com/rouxemmanuel/DashletRestriction.git" rel="nofollow noopener noreferrer" target="_blank"&gt;https://github.com/rouxemmanuel/DashletRestriction.git&lt;/A&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;Run "mvn package" command&lt;/LI&gt;&lt;LI&gt;Get the "dashletRestriction.amp" generated file&lt;/LI&gt;&lt;LI&gt;Deploy it on Share :&lt;UL&gt;&lt;LI&gt;Stop Alfresco&lt;/LI&gt;&lt;LI&gt;Copy into "amps_share" folder&lt;/LI&gt;&lt;LI&gt;Execute "apply_amps" command&lt;/LI&gt;&lt;LI&gt;Start Alfresco&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;Configuration of the restriction&lt;/H3&gt;&lt;H4&gt;Dashlet description file&lt;/H4&gt;&lt;P&gt;The restriction configuration is under the file [dashletName].get.config.xml with the following parameters: &lt;CODE&gt; &amp;lt;config&amp;gt; &amp;lt;restriction&amp;gt; &amp;lt;!-- Add the "users" tag if you want to restrict for some users (use comma to separate users). If you don't want to restrict for user delete the "users" tag. --&amp;gt; &amp;lt;users&amp;gt;abeecher,mjackson&amp;lt;/users&amp;gt; &amp;lt;!-- Add the "groups" tag if you want to restrict for some groups (use comma to separate groups). Set groups without "GROUP_" prefix. If you don't want to restrict for groups delete the "groups" tag. --&amp;gt; &amp;lt;groups&amp;gt;ALFRESCO_ADMINISTRATORS&amp;lt;/groups&amp;gt; &amp;lt;!-- Add the "sites" tag if you want to restrict for some sites (use comma to separate sites). Set sites short name. If you don't want to restrict for sites delete the "sites" tag. --&amp;gt; &amp;lt;sites&amp;gt;swsdp&amp;lt;/sites&amp;gt; &amp;lt;/restriction&amp;gt; &amp;lt;/config&amp;gt; &lt;/CODE&gt;&lt;/P&gt;&lt;H4&gt;Dashlet JavaScript file&lt;/H4&gt;&lt;P&gt;In [dashletName].get.js, add the following code : &lt;CODE&gt; &amp;lt;import resource="classpath:/alfresco/templates/org/alfresco/import/dashlet-restriction-util.js"&amp;gt; if (!isDashletRestricted()) { // Copy the original code of the Dashlet script // if there are functions in the original code of the dashlet, let functions outside this if } &lt;/CODE&gt;&lt;/P&gt;&lt;H4&gt;Dashlet Freemarker file&lt;/H4&gt;&lt;P&gt;In [dashletName].get.html.ftl, surround all code by : &lt;CODE&gt; &amp;lt;#if !isRestrictDashlet&amp;gt; &amp;lt;!-- Original HTML code of the dashlet --&amp;gt; &amp;lt;/#if&amp;gt; &lt;/CODE&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6;" width="100%"&gt;&lt;THEAD&gt;&lt;TR style="background-color: #efefef;"&gt;&lt;TH style="width: 19.5066%;"&gt;&lt;/TH&gt;&lt;TH style="width: 78.7972%;"&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="width: 19.5066%;"&gt;Owner&lt;/TD&gt;&lt;TD style="width: 78.7972%;"&gt;&lt;B&gt;Emmanuel Roux&lt;/B&gt;‌&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 19.5066%;"&gt;Versions&lt;/TD&gt;&lt;TD style="width: 78.7972%;"&gt;&lt;P&gt;Community 4.0.x&lt;/P&gt;&lt;P&gt;Community 4.2.x&lt;/P&gt;&lt;P&gt;Community 5.0.x&lt;/P&gt;&lt;P&gt;Community 5.1.x&lt;/P&gt;&lt;P&gt;Enterprise 4.0.x&lt;/P&gt;&lt;P&gt;Enterprise 4.1.x&lt;/P&gt;&lt;P&gt;Enterprise 4.2.x&lt;/P&gt;&lt;P&gt;Enterprise 5.0.x&lt;/P&gt;&lt;P&gt;Enterprise 5.1.x&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 19.5066%;"&gt;License Type&lt;/TD&gt;&lt;TD style="width: 78.7972%;"&gt;Apache&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 19.5066%;"&gt;Project Page&lt;/TD&gt;&lt;TD style="width: 78.7972%;"&gt;&lt;A class="link-titled" href="https://github.com/rouxemmanuel/DashletRestriction" title="https://github.com/rouxemmanuel/DashletRestriction" rel="nofollow noopener noreferrer"&gt;GitHub - rouxemmanuel/DashletRestriction: Alfresco Share plugin to restrict the display of dashlet&lt;/A&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 19.5066%;"&gt;Download Page&lt;/TD&gt;&lt;TD style="width: 78.7972%;"&gt;&lt;A class="link-titled" href="https://github.com/rouxemmanuel/DashletRestriction" title="https://github.com/rouxemmanuel/DashletRestriction" rel="nofollow noopener noreferrer"&gt;GitHub - rouxemmanuel/DashletRestriction: Alfresco Share plugin to restrict the display of dashlet&lt;/A&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 19.5066%;"&gt;Tags&lt;/TD&gt;&lt;TD style="width: 78.7972%;"&gt;Share Dashlet&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 19.5066%;"&gt;Component Type&lt;/TD&gt;&lt;TD style="width: 78.7972%;"&gt;Share Dashlet&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 19.5066%;"&gt;Extension Points&lt;/TD&gt;&lt;TD style="width: 78.7972%;"&gt;Share Site Dashlet&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 19.5066%;"&gt;Installation&lt;/TD&gt;&lt;TD style="width: 78.7972%;"&gt;AMP&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 19.5066%;"&gt;Products&lt;/TD&gt;&lt;TD style="width: 78.7972%;"&gt;Share Web Client&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Jun 2018 02:37:40 GMT</pubDate>
    <dc:creator>alfresco</dc:creator>
    <dc:date>2018-06-20T02:37:40Z</dc:date>
    <item>
      <title>Dashlet Restriction</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/dashlet-restriction/m-p/4078#M1714</link>
      <description>Developed by Emmanuel ROUX Please use GitHub issue tool to post issues.PresentationThis plugin allows to control the display of dashlet with restriction on:user(s)group(s)site(s)The restriction combinaison is a logical AND. So, If you combine restrictions, for example for a site and a group, only us</description>
      <pubDate>Wed, 20 Jun 2018 02:37:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/dashlet-restriction/m-p/4078#M1714</guid>
      <dc:creator>alfresco</dc:creator>
      <dc:date>2018-06-20T02:37:40Z</dc:date>
    </item>
  </channel>
</rss>

