Skip to main content
Announcements
Qlik Community Office Hours - Bring your Ideation questions- May 15th, 11 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Security Implementation using id's

Hi Experts,

I have three tabs (tab names are stats, applications and products)in the dashboard, the first 2 tabs should be visible and 3rd tab should not be visible for couple of users.

And the three tabs should be visible for couple of users.

Could you pls let me know how to implement on this security?

Thanks,

8 Replies
Not applicable
Author

Yes,

You need to implement section access and section application and add a column in section access like that:

section access;

LOAD [ACCESS],

NTNAME,

SHEET, //GROUP OF ACCESS SHEET

[USERID],

[PASSWORD],

upper([USERID]) ,

upper([USERID])

FROM table1;

and section application like that:

LOAD SHEET, //GROUP OF ACCESS SHEET

SH01, // VALUE 1 OR 0 (1 IF VISIBLE)

SH02 // VALUE 1 OR 0 (1 IF VISIBLE)

FROM table2;

And then, for each sheet, go to properties and adda condition of display the sheet like that:

SHEET(« SH01 »)>=1

Not applicable
Author

before the section application put that:

section application;

star is *;

Not applicable
Author

Thanks for your quick reply, I heard that we can do it in conditional properties, how we can do it.

Thanks,

Miguel_Angel_Baeyens

Hi,

If there's only conditional for four users, you can do in the sheet properties, General, Show Tab, Conditional:

Match(Upper(OSUser()), 'DOMAIN\ALLOWEDUSERNAME1', 'DOMAIN\ALLOWEDUSERNAME2')


There's no problem adding a section access.

Hope that helps.

Not applicable
Author

But, I am not sure how to implement that should I need to copy above script and paste it into edit script or someway?

pls guide me.

Thanks,

Miguel_Angel_Baeyens

Hello,

In case of the section access, yes, you need to copy that in the script.

My solution is in the sheet properties itself: go to an empty area of your sheet, right click with the mouse, select "Properties", then go to the "General" tab in the dialog that will show up, select "Conditional" in the "Show Sheet" section, and then use the code I posted above with your own domain and usernames.

Since QlikView is case sensitive for Match(), I've used Upper() and set usernames in capitals. It would be more appropiate to use MixMatch() function instead:

MixMacth(OSUser(), 'Domain\AllowedUserName1', 'Domain\AllowedUserName2')


Both should work fine.

Hope that helps.

Not applicable
Author

Hi,

If 1 or 2 users ok, suppose if I have more than 100 users then what is condition to work it out.

Thanks,

Miguel_Angel_Baeyens

Hi,

In both cases (section access or mixmatch function) you are going to add one by one all users with access and restrictions. You can load those "Domain\Users" from an excel, database, or inline table, and then use something like

Users:LOAD 'DOMAIN\User' & Chr(65 + Rand() * 20) AS ID // users allowed or restrictedAUTOGENERATE 20; ToVariable:LOAD Concat(DISTINCT ID, chr(39) & ',' & chr(39)) AS AllUsers // needed to create the variableRESIDENT Users; LET vUsers = chr(39) & Peek('AllUsers', 0) & chr(39); // All users quoted and separated by comma DROP TABLE ToVariable;


The conditional is the same, although referring to a variable

MixMatch(OSUser(), $(vUsers))


Will return greater than zero (true) if the user that is logging is in the list of allowed users.

Hope that helps