Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problems with Section Access

I'm playing around with inline section access to test out functionality.  I'm having trouble logging in with USERs.  ADMINs just fine.

here is my code:

Section Access;

LOAD * INLINE [

    ACCESS, USERID, PASSWORD

    ADMIN, ADMIN, ADMINPWD

    USER, BOB, BOBPWD

];

Section Application;

LOAD * INLINE [

USERID, Representative

BOB, BOB

];

When opening the document using the admin user, it opens just fine.  If I try to use a USER userid, I get "Access denied to this Qlikview document"

Anyone know what I'm doing wrong?  I have reloaded after adding. I have "Initial Data Redectuion Based on Section Access" and "Strict Exclusion" checked.

1 Solution

Accepted Solutions
IAMDV
Luminary Alumni
Luminary Alumni

You need to make the Reduction field and Section Access Fields in UPPER CASE. Although, if you are using INLINE Load then QlikView implicitly converts them to UPPER CASE. But if you are loading from Excel / Databases / Other Sources then you need to make the field values in UPPER CASE.

Please be very careful using the '*' (Wildcard) because it doesn't mean all the values in the Actual Field. It means distinct values you have specified in Section Access Table. Unless you have specified all the distinct values within Section Access.

Please read this thread for detailed information and example:

http://community.qlik.com/message/247356#247356

Good luck!

Cheers,

DV

www.QlikShare.com

View solution in original post

24 Replies
Not applicable
Author

Hi

It is related to your Section Application part, the field Representative should be in UPPER CASE for this to work. But also, that field (and not USERID) should be the one to link to section access table.

Having said that, you only need this field/table if you want to restrict access for Bob to a certain cut of the Data (i.e. to any data that is linked to his name as a Representative. If you don't want to do that then you can remove that part of the implementation.

To protect the document, and simply allow each authorised user to see the whole document, just limit your code to the first part which looks fine to me.

Cheers,

Nigel.

Not applicable
Author

Correct, I'm trying to limit access.  So you are saying this where representative is the actual field I want to cut data from?

Section Access;

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, NAME

    ADMIN, ADMIN, ADMINPWD, ADMIN

    USER, BOB, BOBPWD, BOB

];

Section Application;

LOAD * INLINE [

NAME, REPRESENTATIVE

BOB, BOB

];

And what if I want to give Bob access to two Reps data, is it like this:

Section Access;

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, NAME

    ADMIN, ADMIN, ADMINPWD, ADMIN

    USER, BOB, BOBPWD, BOB

];

Section Application;

LOAD * INLINE [

NAME, REPRESENTATIVE

BOB, BOB

BOB, TERRY

];

MayilVahanan

Hi

Please refer this

http://community.qlik.com/docs/DOC-1853

It helps for section access

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

No.

The field that you want to limit must be in the section acces table and

should contain the limit you want to enforce, I'm guessing that you have

some sales data and Bob is a Sales Rep, you have a dimension for the

sales rep with a column called Representative, and you want to make sure

that Bob only see's data that is "his own".

Also note the following:

Add a Star is * line before all of your code:

The * against the ADMIN line in section access means that this user can

see all data

Note that in the code below I'm aasuming that RepData: is actually what

you have as a dimension table against your data model.

STAR IS *;

Section Access;

LOAD * INLINE [

ACCESS, USERID, PASSWORD, REPRESENTATIVE

ADMIN, ADMIN, ADMINPWD, *

USER, BOB, BOBPWD, BOB

];

Section Application;

RepData:

LOAD * INLINE [

NAME, REPRESENTATIVE

BOB HOSKINS, BOB

];

Not applicable
Author

I appreciate the link to the document but I continue to only be able to open the file as admin.  User types get access denied still.

This is my current hidden script:

STAR IS *;

Section Access;

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, REPRESENTATIVE

    ADMIN, ADMIN, ADMINPWD, *

    USER, BOB, BOBPWD, BOB

];

Section Application;

Reps:

LOAD

     name,

     rep as REPRESENTATIVE;

SQL SELECT  name, rep

FROM mydb.dbo.reps;

Not applicable
Author

First, try removing the REPRESENTATIVE part of the section access table,

this will just make sure that your section access code protects the

document and that your problem is in the link to REPRESENTATIVE. Let me

know if this works and we'll move forward, I'll do the same thing on a

test document here.

Not applicable
Author

Yes, this works but only if I uncheck "Initial Data Redectuion Based on Section Access" and "Strict Exclusion"

If those are checked I can't even login as a user.

So this is my new hidden script

STAR IS *;

Section Access;

LOAD * INLINE [

    ACCESS, USERID, PASSWORD

    ADMIN, ADMIN, ADMINPWD

    USER, BOB, BOBPWD

];

Section Application;

Reps:

LOAD

     name,

     rep as REPRESENTATIVE;

SQL SELECT  name, rep

FROM mydb.dbo.reps;

Not applicable
Author

I just tried your code, it worked fine!

All I did was replace you SQL statement with an inline load, I opened

the document and it asked for a user name and password, I put in BOB,

BOBPWD and the document came up with only BOB showing.

Not applicable
Author

On the server, are you using NTFS authorisation?