Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
gcharlesworth
Contributor II
Contributor II

Section Access only working for users with RootAdmin privileges - QS

Hi all -

Looking for some quick insight on a small issue I'm having. While testing a basic Section Access script for an application with a small sample of internal users, I noticed that users without RootAdmin roles (given in the QMC) were denied from the application even though they were hard-coded into the Section Access script.

I verified my hypothesis by adding three fellow developers to the Section Access script (all with RootAdmin privileges) and three normal end-users from the business. The former three were able to pass and the data reduced correctly, while the latter three were denied access. I then gave a RootAdmin role to one business user and re-tested; he was able to pass and the data reduced accordingly.

Any ideas on what's going on here?

1 Solution

Accepted Solutions
PabloTrevisan
Partner - Creator II
Partner - Creator II

Gary,

Adequate your script based on my example that will work correctly, detail: you will use the '*' in the Section Application, see my example above.


  1. Section Access; 
  2.  
  3. LOAD * inline [ 
  4.   ACCESS, USERID, REDUCTION 
  5.   ADMIN, TXT\GARY, GARY
  6.   ADMIN, TXT\MARIE, MARIE 
  7.   USER,  TXT\JOHN, JOHN
  8.   USER,  INTERNAL\SA_SCHEDULER,,,* 
  9. ]; 
  10.  
  11. Section Application; 
  12.  
  13. Star is *; 
  14.  
  15. TAB: 
  16. Load * InLine [ 
  17.     REDUCTION, SOLD
  18.     GARY, * 
  19.     MARIE, 12546 
  20.     JOHN, 123456
  21.     SVC_SENSE, * 
  22.      
  23. ]; 



Note that SOLD it's a FIELD from your data model.

View solution in original post

5 Replies
PabloTrevisan
Partner - Creator II
Partner - Creator II

Hi Gary, in cases with Data Reduction use this format....

Could you show me your script ?

EXAMPLE:

Section Access;

LOAD * inline [

  ACCESS, USERID, REDUCTION

  ADMIN, DOMAIN\USER1, USER1

  ADMIN, DOMAIN\USER2, USER2

  USER,  DOMAIN\USER3, USER3

  USER,  INTERNAL\SA_SCHEDULER,,,*

];

Section Application;

Star is *;

TAB:

Load * InLine [

    REDUCTION, CONTRY

    USER1, *

    USER2, *

    USER3, USA   

    SVC_SENSE, *

   

];

gcharlesworth
Contributor II
Contributor II
Author

Pablo -

Here is my sample generator for SA qvd within my Qlikmart, and the SA implemented in the application:

Section Access Load.PNG

Section Access 2.PNG

PabloTrevisan
Partner - Creator II
Partner - Creator II

Gary,

Adequate your script based on my example that will work correctly, detail: you will use the '*' in the Section Application, see my example above.


  1. Section Access; 
  2.  
  3. LOAD * inline [ 
  4.   ACCESS, USERID, REDUCTION 
  5.   ADMIN, TXT\GARY, GARY
  6.   ADMIN, TXT\MARIE, MARIE 
  7.   USER,  TXT\JOHN, JOHN
  8.   USER,  INTERNAL\SA_SCHEDULER,,,* 
  9. ]; 
  10.  
  11. Section Application; 
  12.  
  13. Star is *; 
  14.  
  15. TAB: 
  16. Load * InLine [ 
  17.     REDUCTION, SOLD
  18.     GARY, * 
  19.     MARIE, 12546 
  20.     JOHN, 123456
  21.     SVC_SENSE, * 
  22.      
  23. ]; 



Note that SOLD it's a FIELD from your data model.

1994
Contributor
Contributor

 
AUTHORIZARTION:
LOAD
'USER' AS ACCESS,
    UPPER(USER_DOMAIN)&'\'&UPPER(USER_CODE) AS "USERID",
 //   Upper([ACCESS]) as ACCESS,
    USER_COMP_CODE ,
    USER_CAT_CODE ,
    SCHEMA AS ENTITY
FROM [lib://Retail /ACCESSDATA1.qvd]
(qvd)WHERE USER_MODULE='Sales' ;
 
LOAD * INLINE
[
 ACCESS,USERID,USER_COMP_CODE,USER_CAT_CODE,ENTITY
 
'ADMIN','INTERNAL\SA_SCHEDULER','ALL','ALL','ALL'
 
'CONTENTADMIN','FFC\ANKITA.THT',ALL,'ALL','ALL'
'ADMIN','FFC\AKASH.M','ALL','ALL','ALL'
'USER','FFC\XYZ
.ABC','001','ALL','ALL'
];
 
SECTION ACCESS;
LOAD
Upper(trim("ACCESS")) as ACCESS,
    Upper(trim("USERID")) as USERID,
    IF(UPPER(TRIM([USER_COMP_CODE]))= 'ALL','*', TEXT([USER_COMP_CODE])) AS [COMPANY ID],
   // IF(UPPER(TRIM([USER_DIVN_CODE]))= 'ALL','*', TEXT([USER_DIVN_CODE])) AS [DIVISION ID],
    IF(UPPER(TRIM([USER_CAT_CODE]))= 'ALL','*', TEXT([USER_CAT_CODE])) AS [ITEM CATEGORY],
    IF(UPPER(TRIM([ENTITY]))= 'ALL','*', TEXT([ENTITY])) AS [ENTITY]
RESIDENT AUTHORIZARTION;
 SECTION APPLICATION;
DROP TABLE AUTHORIZARTION;                                                                                                                 sectional access working for only admin and content admin not for users
1994
Contributor
Contributor

AUTHORIZARTION:
LOAD
'ADMIN' AS "ACCESS",
UPPER(USER_DOMAIN)&'\'&UPPER(USER_CODE) AS "USERID",
  // LOGIN_USER_CODE,
    USER_CODE,
    USER_COMP_CODE,
    USER_CAT_CODE,
    USER_MODULE,
   SCHEMA AS ENTITY
FROM [lib://Retail QVD (qlik-bi_qsadmin)/ErpsysretQVD/Master\ACCESSDATA1.qvd]
(qvd);
 
LOAD * INLINE
[
 ACCESS,LOGIN_USER_CODE,COMP_CODE,CAT_CODE,ENTITY
'ADMIN','INTERNAL\SA_SCHEDULER','ALL','ALL','ALL
 
'USER','FFC\ANKITA
','ALL','ALL','ALL'
 
 
 ];
 
SECTION ACCESS;
LOAD
"ACCESS",
     USERID,
    IF(UPPER(TRIM([USER_COMP_CODE]))= 'ALL','*', TEXT([USER_COMP_CODE])) AS [COMPANY ID],
  IF(UPPER(TRIM([USER_CAT_CODE]))= 'ALL','*', TEXT([USER_CAT_CODE])) AS [ITEM CATEGORY],
 IF(UPPER(TRIM([ENTITY]))= 'ALL','*', TEXT([ENTITY])) AS [ENTITY]
RESIDENT AUTHORIZARTION;
SECTION APPLICATION;   THIS SECTION SCCESS NOT WORKING FOR USER ACCESS DENIED FOR ANKITA USER