06-19-2018 10:37 PM
Developed by Emmanuel ROUX Please use GitHub issue tool to post issues.
This plugin allows to control the display of dashlet with restriction on:
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.
The restriction configuration is under the file [dashletName].get.config.xml with the following parameters: <config> <restriction> <!-- 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. --> <users>abeecher,mjackson</users> <!-- 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. --> <groups>ALFRESCO_ADMINISTRATORS</groups> <!-- 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. --> <sites>swsdp</sites> </restriction> </config>
In [dashletName].get.js, add the following code : <import resource="classpath:/alfresco/templates/org/alfresco/import/dashlet-restriction-util.js"> 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 }
In [dashletName].get.html.ftl, surround all code by : <#if !isRestrictDashlet> <!-- Original HTML code of the dashlet --> </#if>
Owner | Emmanuel Roux |
Versions | Community 4.0.x Community 4.2.x Community 5.0.x Community 5.1.x Enterprise 4.0.x Enterprise 4.1.x Enterprise 4.2.x Enterprise 5.0.x Enterprise 5.1.x |
License Type | Apache |
Project Page | GitHub - rouxemmanuel/DashletRestriction: Alfresco Share plugin to restrict the display of dashlet |
Download Page | GitHub - rouxemmanuel/DashletRestriction: Alfresco Share plugin to restrict the display of dashlet |
Tags | Share Dashlet |
Component Type | Share Dashlet |
Extension Points | Share Site Dashlet |
Installation | AMP |
Products | Share Web Client |
Explore our Alfresco products with the links below. Use labels to filter content by product module.