See dashboards assigned to users using psql

Is there a simple way to see the dashboards assigned to or shared with a particular user in the database tables? Which tables should I be investigating?

Thanks!

Update for anyone else requiring this, this will get the name of all dashboards assigned to a particular user (specified by username):

SELECT dashboard.name as Dashboard FROM dashboard where dashboard.dashboardid in (

SELECT dashboardid from dashboardusergroupaccesses where dashboardusergroupaccesses.usergroupaccessid in (

SELECT usergroupaccessid FROM usergroupaccess where usergroupaccess.usergroupid in (

SELECT usergroup.usergroupid from usergroup where usergroup.usergroupid in (

SELECT usergroupmembers.usergroupid from usergroupmembers where usergroupmembers.userid = (

SELECT userid from users where username = ‘username’)))))

UNION

SELECT dashboard.name FROM dashboard where dashboard.dashboardid in (

SELECT dashboardid FROM dashboarduseraccesses where dashboarduseraccesses.useraccessid in (

SELECT useraccessid FROM useraccess where useraccess.userid in (

SELECT userid FROM users WHERE username = ‘username’)));

Sometimes you can’t easily get this information from a user, or perhaps you have an issue with an account that needs to be recreated as I did.

Ed

···

From: Dhis2-users [mailto:dhis2-users-bounces+erobinson=projectbalance.com@lists.launchpad.net] On Behalf Of Edward Robinson

Sent: Monday, 02 October 2017 2:20 PM

To: DHIS 2 Users list dhis2-users@lists.launchpad.net

Subject: [Dhis2-users] See dashboards assigned to users using psql

Is there a simple way to see the dashboards assigned to or shared with a particular user in the database tables? Which tables should I be investigating?

Thanks!