Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

User Access : How to detect admin users ?

Hi,

I'm using the QlikView security in a qvw file.

I would like to know if there is a simple way to detect if a user is an admin, that is to say if the ACCESS field in the section access part is equal to 'ADMIN'. I have a little problem because that table is hidden.

Best regards

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

In fact I've manage to do it using the line data reduction :

In the security table where I've the ACCESS field, I add an additional calculated field : FLAG_ADMIN : (if(ACCESS='ADMIN',1,0)) as FLAG_ADMIN,

Then in section Application I add a little table :

LOAD * INLINE [
FLAG_ADMIN
1
0
];

And last I open "Settings" / "Documents Properties" / "Opening Tab" and I check the option "Initial Data Reduction based on Section Access"

then, in my document, to know if my user is an admin I can use that field : if(FLAG_ADMIN ....

(Note : if a user is both USER and ADMIN you should use max(FLAG_ADMIN) instead

I also made an improvement request to QlikTech

Regards

View solution in original post

9 Replies
Not applicable
Author

Create a text object and inside the text you copy the below script

=QVuser( )

but this will tell which user has logged in to the document!

Not applicable
Author

Thanks for your answer,

but that's not exactly what I'm looking for : the QVuser() function will show me the USERID field value (name of the QVUser) but not the ACCESS one (ADMIN/USER).

Do you have another idea ?

Best regards

Not applicable
Author

No idea at all ?

I thought that point was an common one ?

Not applicable
Author

Hi Bertrand!

Have you got any solution? If yes please let me know.

Not applicable
Author

Hi, I have my security set up a little differently, it works like this:

LOAD ACCESS, USERID, PASSWORD, DEPT;

SQL SELECT *

FROM "sqltable1;

section application;

star is *;

ODBC CONNECT TO SQl;

LOAD DEPT, "ControlField";

SQL SELECT *

FROM "Sqltable2;

This is a little different to what you were looking for but might help, what this means is that the system identifies users based on a set list, then depending on their department limits them to the set of data they can view.

Maybe this will help?

Ben

Not applicable
Author

Hi,

In fact I've manage to do it using the line data reduction :

In the security table where I've the ACCESS field, I add an additional calculated field : FLAG_ADMIN : (if(ACCESS='ADMIN',1,0)) as FLAG_ADMIN,

Then in section Application I add a little table :

LOAD * INLINE [
FLAG_ADMIN
1
0
];

And last I open "Settings" / "Documents Properties" / "Opening Tab" and I check the option "Initial Data Reduction based on Section Access"

then, in my document, to know if my user is an admin I can use that field : if(FLAG_ADMIN ....

(Note : if a user is both USER and ADMIN you should use max(FLAG_ADMIN) instead

I also made an improvement request to QlikTech

Regards

bumin
Partner - Creator II
Partner - Creator II

Hi Ben,

can you send an example from you you SQL-Table with Access-Fields or a quick QV-Dokument?

I don't see exatly how do you manage it?

I want to restrict each user to specific departments.

Each salesman can only see his departments

regards

Bumin

kusha_2007
Contributor III
Contributor III

 I tried this approach but it didnt worked.

kusha_2007
Contributor III
Contributor III

Hello All , 

 

I tired to use this approach to hide a particular tab for users but with this settings , the Qlikview file doesnt open in  Access Point. I t opens in the desktop though .

Please advise.

 

Thanks 

Kusha Agrawal