Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

kalmirall
New Contributor II

App Access Denied with Section Access

I'm adding Section Access for the first time to an app, and am finding no matter what I put in the script (even if it's an exact copy of what's included on the related help page, once I run and post it to the hub, I get an "access denied" message when I try to open that particular app.

Here's the section access script I'm using to allow me (KALMIRALL) access to see all fields, and another user (KRODBRO) access to only see records associated with Chicago.  Both of us are getting the "access denied" message when we try to open the app, but can access it fine if we comment out this section of the script.

Section Access;   

LOAD * inline [

ACCESS, USERID,REDUCTION

USER, NLNS-NY-APPS\KALMIRALL,*,

USER, NLNS-NY-APPS\KRODBRO,CHICAGO,

USER, INTERNAL\SA_SCHEDULER,*,

];

section application;

T1:

LOAD *,

UPPER(Key_City) AS REDUCTION

RESIDENT APPDetail;

4 Replies
MVP
MVP

Re: App Access Denied with Section Access

Hi Katie,

What solved your problem is the following declaration:

STAR IS *;

It means that whoever is defined with *, should get access to all possible values in the field.

I noticed, however, that this setting leads to a significant slow-down of the script. I ended up building the list of all possible entities manually, to avoid using STAR IS *;

cheers,

Oleg Troyansky

Check out my new book QlikView Your Business - The Expert Guide for QlikView and Qlik Sense

kalmirall
New Contributor II

Re: App Access Denied with Section Access

Sorry Oleg- I'm not quite sure I understand what I should change to not get an "access denied" message.

MVP
MVP

Re: App Access Denied with Section Access

Katie,

My initial though was that adding one line would help you problem:

STAR IS *;

however, after reading your script one more time, I'm not sure that this is enough.

In order to facilitate Data Reduction by section access, you need to ensure the following:

1. Add an extra field to the Access table with upper case values (no * there).

2. Associate the new field with an existing field in your database in Section Application, based on what information should be available to what users. Something along the following lines:

Section Access;  

LOAD * inline [

ACCESS, USERID,REDUCTION

USER, NLNS-NY-APPS\KALMIRALL, ALL

USER, NLNS-NY-APPS\KRODBRO, CHICAGO

USER, INTERNAL\SA_SCHEDULER, ALL

];

section application;

STAR IS *;

T1:

LOAD * inline [

REDUCTION, Key_City

ALL, *

CHICAGO, Chicago

];

The important missing part in your script is that the association between the security field REDUCTION and the database field Key_City has to be defined in Section Application, not in Section Access.

cheers,

Oleg Troyansky

gompa786
Contributor III

Re: App Access Denied with Section Access

Hi Katie,

In your Section Application you have used RESIDENT APPDetail...

can you give me a snapshot of how AppDetail table looks like .. as there should be association of the section application with your AppDetail table and for the timebeing please avoid using '*' in the section access reduction fields or please attach your sample app I will write the logic and send it across to you..

Thanks