Dashlet group restrictions

cancel
Showing results for 
Search instead for 
Did you mean: 
billydekid
Established Member II

Dashlet group restrictions

Hi,

I want to develop a dashlet with specific group restriction access.

I have followed small tutorial here: Technical Tips & Tricks: Restricting Availability of Alfresco Dashlets by Group but it's still fail.

Alfresco documentation about family tag is also never explains about group feature.

family | Alfresco Documentation 

Has anyone success or have a clue to implement this?

Thanks,

[bayu]

4 Replies
krutik_jayswal
Senior Member II

Re: Dashlet group restrictions

Documentation link which you have give is correct.It should work in your case.Its better if you can include code.

I think you might be misundedrstood below thing.In alfresco group name has a prefix which is "GROUP_"

If you want to give access to specific group for particular dashlet you can give it.For example if you would like to give access to dashlet to particular group named as Workflow_Users, than family tag should be like below.

 <family>group:GROUP_Workflow_Users</family>  
billydekid
Established Member II

Re: Dashlet group restrictions

Following are my two files in folder: /opt/alfresco-community/tomcat/shared/classes/alfresco/web-extension/site-webscripts/id/billydekid/dashlets/dashletone

dashlet1.get.desc.xml

<webscript>
   <shortname>Billydekid Dashlet Test</shortname>
   <description>A dashlet for fun!</description>
   <family>site-dashlet</family>
   <family>group:GROUP_REGULATORS</family>
   <url>/dashlets/dashletone/billone</url>
</webscript>
‍‍‍‍‍‍‍

dashlet1.get.html.ftl

<div class="dashlet">
  <div class="title">Hello Dashlet</div>
  <div class="body scrollableList">
    Hello Boy
  </div>
</div>
‍‍‍‍‍‍

I created 2 users which one is having group REGULATORS.

Both of those users still can see the dashlet.

billydekid
Established Member II

Re: Dashlet group restrictions

I thought it's my misunderstanding of the tutorial. What I expect is the final dashlet will restrict only for particular users of specific group. But after read it again, the "group" parameter is only restrict availability of dashlets list in Customize Site/User Dashboard page. Hence if user is not member of particular group defined in descriptor file, he/she will not see the dashlet (in Customize Site/User Dashboard page).

My first question is still unanswered: How to restrict dashlet appearances for a particular group?

Thank you!

sanjaybandhniya
Intermediate

Re: Dashlet group restrictions

Hi,

You can Refer This link to restrict dashlet base on group.

https://github.com/rouxemmanuel/DashletRestriction