Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

satishqlik
Contributor

working with SA in Qliksense qmc

Hi Viewers,

I've been facing some issue while implementing section access in Qliksense qmc

Below is my script for your reference.


SECTION ACCESS;

TEST:

LOAD *

INLINE [

ACCESS, USERID,                          COUNTRY

ADMIN,  DOMAIN\ADMIN,              *

USER,   DOMAIN\USER1,             GERMANY

USER,   DOMAIN\USER2,             CHILE

USER,   DOMAIN\USER3,             BRAZIL

];

SECTION APPLICATION;


After execution this script,

I can able to see the data as per section access.

But only problem with assign permissions to USERs. .


I have opened the application with my userid and I can see data without any permissions as

admin will have only all these rights.

generally I can see options if I logged in with my userid

data load editer

data model viewer

add new sheet

How do I restrict all these rights for users???

Any suggestions will be appreciated.

Kindly help.



Tags (1)
10 Replies
agigliotti
Honored Contributor II

Re: working with SA in Qliksense qmc

you should use someting as below for data redution:

SECTION ACCESS;

TEST:

LOAD *

INLINE [

ACCESS, USERID,                         SA_COUNTRY

ADMIN,  DOMAIN\ADMIN,              ALLVALUES

USER,   DOMAIN\USER1,             GERMANY

USER,   DOMAIN\USER2,             CHILE

USER,   DOMAIN\USER3,             BRAZIL

];

SECTION APPLICATION;

STAR IS '*';

tab1:

load

     SA_COUNTRY,

     SA_COUNTRY as COUNTRY

resident TEST where SA_COUNTRY <> 'ALLVALUES';

concatenate

load

     SA_COUNTRY,

     '*' as COUNTRY

resident TEST where SA_COUNTRY = 'ALLVALUES';


STAR IS;

//where COUNTRY is your data model field in section application.

while to apply restrictions of privileges you should use security rules.

Hope it helps.

DavidŠtorek
Contributor III

Re: working with SA in Qliksense qmc

Hi,

your question is not clear at all, What are you trying to do? Do you want to implement row level security to app or do you want to restrict users access to QMC? Those are two totally different things.

rittermd
Honored Contributor

Re: working with SA in Qliksense qmc

Restricting the data that a user can view does not change their rights in QS to do things like create sheets, stories, bookmarks, etc.  This is controlled in the security rules in the QMC.

satishqlik
Contributor

Re: working with SA in Qliksense qmc

Hi Andrea,

As you suggested I have tried with only Country in my actual data and this is working fine.

Also here I would like to add zone in section access.

How do we do that??

Please can you suggest on this?? 

agigliotti
Honored Contributor II

Re: working with SA in Qliksense qmc

you can do as below:

SECTION ACCESS;

TEST:

LOAD *

INLINE [

ACCESS, USERID,                         SA_COUNTRY,     SA_ZONE

ADMIN,  DOMAIN\ADMIN,              ALLVALUES,       ALLVALUES

USER,   DOMAIN\USER1,             GERMANY,           ZONE1

USER,   DOMAIN\USER2,             CHILE,                 ZONE2

USER,   DOMAIN\USER3,             BRAZIL,              ZONE3

];

SECTION APPLICATION;

STAR IS '*';

tab1:

load

     SA_COUNTRY,

     SA_COUNTRY as COUNTRY

resident TEST where SA_COUNTRY <> 'ALLVALUES';

concatenate

load

     SA_COUNTRY,

     '*' as COUNTRY

resident TEST where SA_COUNTRY = 'ALLVALUES';


tab2:

load

     SA_ZONE,

     SA_ZONE as ZONE

resident TEST where SA_ZONE <> 'ALLVALUES';

concatenate

load

     SA_ZONE,

     '*' as ZONE

resident TEST where SA_ZONE = 'ALLVALUES';



STAR IS;

//where COUNTRY and ZONE are your data model fields in section application to apply data reduction.

Hope it helps.

satishqlik
Contributor

Re: working with SA in Qliksense qmc

Thank you

I have implemented the same in my actual application.Almost closed to what am exactly looking for.(except blank zones).

But here I(USER3) could see only one country in out of 3 countries(USER3).

SECTION ACCESS;

TEST:

LOAD *

INLINE [

ACCESS, USERID,                         SA_COUNTRY,     SA_ZONE

ADMIN,  DOMAIN\ADMIN,              ALLVALUES,       ALLVALUES

USER,   DOMAIN\USER1,             GERMANY,           ZONE1

USER,   DOMAIN\USER2,             CHILE,                 ZONE2

USER,   DOMAIN\USER3,             BRAZIL,              ZONE3

USER,   DOMAIN\USER3,             INDIA,             

USER,   DOMAIN\USER3,             USA,             

];

SECTION APPLICATION;

If I would like to see remaining countries(no zones for these countries) data. How do I approach ??

agigliotti
Honored Contributor II

Re: working with SA in Qliksense qmc

I think should works replacing blank zone with 'ALLVALUES'.

satishqlik
Contributor

Re: working with SA in Qliksense qmc

Hi, Thanks for your valueble response.

Yes it's working fine as I expected.

But in other application, I've implemented the same for the below listed users(provided by the end user)

and it's throwing one error with "Access is denied".

my script looks like as below(PFB for your reference)

Capture2.PNG

    But If I changed to USER access to ADMIN(PFB, for your reference) then its working fine.

Capture1.PNG

Can you help me out in this where I did wrong. ?

Thanks,

agigliotti
Honored Contributor II

Re: working with SA in Qliksense qmc

if you get "access is denied" message it means that your logged user can't see any data based on your data reduction.

Keep in mind that Qlik Sense uses strict exclusion as in Qlikview.

All your end users should be USER as ACCESS.

Only developers users should be ADMIN as ACCESS.

For which user you get that message ?

Also I need to see the section access details and how you apply data reduction in section application for that user.