Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
eldenring
Contributor
Contributor

Qlik Sense Section Access - Get (admin) roles from QMC

Hello everyone,

I am quite new to this topic section access. I would like to know if it is possible or any ways to get the information about the roles of a user to use it in the loading script to limit the data view or to reduce it.

Currently, I got a data table with a column "restricted". The "restricted" is a flag column, which marks each data. The flag 0 marks data as "public" and can be seen normally, while a flag 1 means private or it is not allowed to be shown and therefore must be restricted for the data lines.

At the moment I achieved that my user could only see the data lines which has the flag 0

E.g.:

Section Access;

Restriction:

Load *

Inline

[

ACCESS,                                USERID,                                        RESTRICTED

USER,                                    1234\hello@web.com,            0

];

Section Application;

 

Data_tab:

Load

    YEAR,

    RESTRICTED,

    Country,

   Sales

resident XXX;

 

My goal: If the user have the role "permission_view_all", which is assigned and shown in the QMC, then the user can see all data. In other case, if he has not the role then he has a limited view on data (row-level-wise).

Is there any way to get the roles information from QMC to use it in my Section Access table? I wanna to built my App around the role to limit the data view

Sorry for my english and the repetition 😄

Thanks in advance!

Labels (4)
1 Reply
Or
MVP
MVP

You can set up a connection to your postgres repository and pull the information from public.users (it should be the Userid and RolesString fields, I believe).