Here's a script to cascade dashboard permissions!

Hi dear Community!

(read in commercial tone)

Are you tired of spending hours in sharing permissions to tables so that people can see them in a dashboard?

Have you ever screwed a dashboard because it has resources with different permissions? [DHIS2-6556] Error in Dashboard when different access rights between dashboard and objects - DHIS 2 JIRA

Here’s a script for you!

(stop commercial tone)

DHIS2 functionality we are looking for: [DHIS2-101] Cascading sharing for dashboards to items - DHIS 2 JIRA

In the meantime this is developed, we have created a script. This script will allow you to cascade all dashboard sharing permissions to the resources that are contained in it. It does not overwrite those permissions, it only adds their parent sharing permissions to the already existing child permissions. You can directly hardcode your URL or create a configuration file with the URLs and connections.

Note that this script was for internal use to temporarily overcome a missing functionallity, so it is not intended to be well formatted or documented or used as an application, if you have any doubt you can reply in here.

Author: @Tomas_Sala

dashboard-sharing-cascading.docx (24.5 KB)

4 Likes

Thanks so much @barreda for posting this!

We are working on a feature for the 2.37 release to enable this, but that will only be available at the end of 2021. So, I encourage everyone to explore this option in the mean time especially if you are not planning to upgrade to 2.37.

2 Likes