Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

section access

Hi there,

i have a question related to section access:

I want to hide a certain object (button) and a certain sheet from the users that i have defined in an outsourced section access table as ACCESS = USER.

All the ACCESS = ADMIN in this table shall see both - the sheet and the button.

How do i check on the user (whether its a USER or an ADMIN) on a sheet and button respectively ?

Thanks for some clues.

regards,

K

6 Replies
Not applicable
Author

Hi,

As per my knowledge Admin can access all the sheets, but the user can see only related sheets as per the password given to the sheets.

If am wrong plz.

Thanks,

Rathish

Miguel_Angel_Baeyens

Hi,

You cannot check whether a given user has or has not ADMIN permissions under the ACCESS field in section access, but you can add a new field (called PERMISSIONS) where you can use those values:

SECTION ACCESS;

LOAD * INLINE [ // Or whatever source of your security table

ACCESS, USERID, PASSWORD, PERMISSIONS

ADMIN, ADMIN, ADMIN

ADMIN, MANAGER, MANAGER, 1

USER, REP, REP, 0

];

SECTION APPLICATION;

If PERMISSIONS is equal to or greater than zero, then the user is an admin so he or she can see the objects, otherwise, the object will be hidden.

Hope that helps.

Miguel

Not applicable
Author

Thanks, Miguel.

I dont want to work with USERID & PASSWORD in section access.

I am working with NTNAME - Will your approach still work ?

How would i check if the user has permission 1 or 0. QVUser() returns nothing when not working with USERID / PASSWORD...

Thanks a lot.

chris_johnson
Creator III
Creator III

Hi,

I have previously created another table, outside of section access (but that still links to it) and then created my extra columns there.

In your case I could imagine creating another table with perhaps ACCESS and QVUser columns and then checking the value of QVUser to determine if the button should be shown or not. Because the ACCESS column will link from your section access to the new table it will filter it down so you will only end up with 1 row in your new table so you shouldn't have a problem checking this field value.

Chris

Miguel_Angel_Baeyens

Hi,

Consider the following piece of script.

SECTION ACCESS;

LOAD * INLINE [

ACCESS, NTNAME, PERMISSIONS

ADMIN, DOMAIN\USER1, 1

USER, DOMAIN\USER2, 0

];

SECTION APPLICATION;

LOAD * INLINE [

PERMISSIONS

1

0

];

Assume there is a text object with the following condition:

Sum(PERMISSIONS)

If the user that is logging in is USER1, the text object will appear. Otherwise, the text object will still be there, but hidden.

Hope that makes more sense.

Miguel

Not applicable
Author

I have to correct myself.

After LOAD of my application there is no selection in any field - this includes PERMISSIONS - and hence i see the text field, even if i would be USER2.

Any idea, how to solve this ?

(Without creating an automatic selection, which the user could erase...)