Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
As of late. I've been trying to implement section access on a Qlik Sense application. The code of this application is a complete copy of a Qlikview application. The problem I'm facing is that for whatever reason the section access doesn't work in Sense but it works in View, and I can't understand why. So far, I've search far too many posts and I havent been able to crack it anyway. While executing the code below, I don't get any errors, but when I publish the app and log with 2 different users both of them see all the data, despite one of them having reduced access.
The table below is the excel file template that serves as a template for the construction of excelsegregation.qvd mentioned below in the code. In this excel file a user "testuser" has access to 5 plants. But when I access the published app with it, the user sees more plants than should be possible.
ACCESS | NTNAME | PLANTCOD |
USER | DOMAIN\testuser | P111 |
USER | DOMAIN\testuser | P222 |
USER | DOMAIN\testuser | P333 |
USER | DOMAIN\testuser | P444 |
USER | DOMAIN\testuser | P555 |
The code below is a reduced representation of what I have, and it doesn't work.
STAR IS *;
SECTION ACCESS;
SecurityTab:
LOAD * INLINE [
ACCESS, NTNAME, USERID, PASSWORD
ADMIN, DOMAIN\QVDEV,*,*
];
JOIN (SecurityTab)
LOAD DISTINCT
UPPER(TRIM(PLANT_COD)) AS PLANT_CODD
FROM [lib://pathfiles (DOMAIN_QVDEV)/Folder1/Plant.qvd](QVD)
WHERE 1 = 1;
CONCATENATE
LOAD UPPER(ACCESS) AS ACCESS,
UPPER(NTNAME) AS NTNAME,
UPPER('*') AS USERID,
UPPER('*') AS PASSWORD,
IF(LEN(UPPER(TRIM(PLANTCOD)))<2,UPPER('*'),UPPER(TRIM(PLANTCOD))) AS PLANT_CODD
FROM [lib://pathfiles (DOMAIN_QVDEV)/Folder1/excelsegregation.qvd](QVD);
SECTION APPLICATION;
M_Plant:
NoConcatenate
LOAD Distinct
Plant_COD,
Plant,
upper(trim(Plant_COD)) as PLANT_CODD
FROM [lib://pathfiles (DOMAIN_QVDEV)/Folder1/Plant.qvd](qvd);
Thank you in advance for any help!
Best regards,
André Braga