SQLview - protected tables

Hi,

Getting the following error while trying to get user list for a given organization unit in sql view:

SQL query contains references to protected tables

The query is here:

Hi,

Yes, the main user tables are protected.

If you have access to the “backend” database, you can bypass it using a construct (query/function) that “re-packages” the user table information so that it can be accessed via sql view. Works, but obviously it creates a security risk (the main user tables are protected for a reason).

Regards

Calle

···

On 13 March 2018 at 12:16, Himanshu Ardawatia himanshu.ardawatia@nrc.no wrote:

Hi,

Getting the following error while trying to get user list for a given organization unit in sql view:

SQL query contains references to protected tables

The query is here:


SELECT

userinfo.surname,

userinfo.firstname,

organisationunit.name

FROM

public.usermembership,

public.userinfo,

public.organisationunit

WHERE

usermembership.userinfoid = userinfo.userinfoid AND

organisationunit.organisationunitid = usermembership.organisationunitid;


Perhaps the userinfo table is protected. Is there a workaround this so the said data can be accessed? OR any other method?

Thanks,

Himanshu


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedberg@gmail.com

Skype: calle_hedberg


1 Like