Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Shriram_Sridhar
Partner - Contributor III
Partner - Contributor III

user level restriction using section access

Hi All,
I was trying to implement section access to restrict what level of data a user can see. Let's take a scenario,  I want to restrict user view based on country and region.

User

Country

Region

A

India

All

B

USA

Texas

C

Canada

All

D

All

All

 

Section Access;
security:

Load * Inline [
ACCESS,USERID, COUNTRY, REGION
USER,DOMAIN\A,INDIA,ALL
USER,DOMAIN\B,USA,TEXAS
USER,DOMAIN\C,CANADA,ALL
USER,DOMAIN\D,ALL,ALL
];

When I implement the above section access, all users see only USA and Texas. The issue occurs only when I add Region in section access.  Your help is much needed.

Labels (1)
1 Solution

Accepted Solutions
rubenmarin

Hi, * could be used to give acess to all values in a field, but only to values loaded in the section access itself. https://help.qlik.com/en-US/sense/February2021/Subsystems/Hub/Content/Sense_Hub/Scripting/Security/m...

To give access to all values of the field you can first load all values and then you can use *.

ie:

AccessData:
LOAD 'USER' as ACCESS,
  'DOMAIN\ADMIN' as USER // or a dummy user that don't really exists
autogenerate 1;

Join (AccessData)
LOAd Distinct COUNTRY, REGION
FROM/resident [WhereValuesAreStored];

concatenate (AccessData)
Load * Inline [
ACCESS,USERID, COUNTRY, REGION
USER,DOMAIN\A,INDIA,*
USER,DOMAIN\B,USA,TEXAS
USER,DOMAIN\C,CANADA,*
USER,DOMAIN\D,*,*
];

View solution in original post

2 Replies
rubenmarin

Hi, * could be used to give acess to all values in a field, but only to values loaded in the section access itself. https://help.qlik.com/en-US/sense/February2021/Subsystems/Hub/Content/Sense_Hub/Scripting/Security/m...

To give access to all values of the field you can first load all values and then you can use *.

ie:

AccessData:
LOAD 'USER' as ACCESS,
  'DOMAIN\ADMIN' as USER // or a dummy user that don't really exists
autogenerate 1;

Join (AccessData)
LOAd Distinct COUNTRY, REGION
FROM/resident [WhereValuesAreStored];

concatenate (AccessData)
Load * Inline [
ACCESS,USERID, COUNTRY, REGION
USER,DOMAIN\A,INDIA,*
USER,DOMAIN\B,USA,TEXAS
USER,DOMAIN\C,CANADA,*
USER,DOMAIN\D,*,*
];
Shriram_Sridhar
Partner - Contributor III
Partner - Contributor III
Author

Thanks a lot!!! It worked for me 🙂