Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner - Master II
Partner - Master II

security and privileges

Hello I got a qlikview document in which I want to create security privileges

well I have 2 tables:

Companies

Countries

I have four groups:

Admins

SYR-Admins

Finanace

users in the Admins groups are allowed to see everything

users in Syr-Admins are allowed to see data related to specific countries

users in the Finanace group are allowed to see data related to specific company

can someone help me how to create this system of security using section access in the script?

I can walk on water when it freezes
9 Replies
Miguel_Angel_Baeyens

Hi,

Are companies within countries or are both tables not associated?

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

ali_hijazi
Partner - Master II
Partner - Master II
Author

no association

I can walk on water when it freezes
Miguel_Angel_Baeyens

Hi,

Use two reduction fields in your section access script, something like

SECTION ACCESS;

LOAD * INLINE [

ACCESS, USERID, PASSWORD, CNAME, CODE

ADMIN, ADMIN, ADMIN

USER, SYRADMIN1, SYRADMIN1, FR

USER, SYRADMIN1, SYRADMIN1, UK

USER, FINANCE1, FINANCE1, -, 1

USER, FINANCE1, FINANCE1, -, 2

];

SECTION APPLICATION;

Countries:

LOAD * INLINE [

CNAME, LONGNAME

FR, FRANCE

UK, UNITED KINGDOM

US, UNITED STATES

DE, GERMANY

SE, SWEDEN

-, DUMMY

];

Companies:

LOAD * INLINE [

Name, CODE

AAA, 1

BBB, 2

CCC, 3

];

At least one country ("Dummy" in this case) must exist (although only the CNAME field is needed).

Go to the Document Properties in the Settings menu, Opening tab and check "Initial Data Reduction Based on Section Access".

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

ali_hijazi
Partner - Master II
Partner - Master II
Author

sounds good but the users and password are related to users of the active directory

can we load the users names and email addresses into section access instead of manually creating users and their passwords?

I can walk on water when it freezes
Miguel_Angel_Baeyens

Hi,

Yes, you can load them from the AD, using the OLE DB Connect button, OLE DB Providers for Microsoft Directory Services, and setting your AD server there. In section access you will change USERID and PASSWORD fields for the NTNAME field, that must match with the current DOMAIN\USERNAME as returned by the OSUser() function (use a text object, just for testing).

What you have to do is to create those groups where the reduction fields apply, one line per value

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable

hello, i have a similar problem.

we have many sales agents with a specific sales area and boss of that areas (that are two fields of our qlik document, area ad boss-area). these fields are not strictly linked together, because a sales agent can have more boss (depending on something).

i would like to give access to boss areas, so that they can view all of that area and also to the sales agent (that can view only their area).

i tried something like this:

 

Section Access;

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, AREACODE, AGENTCODE

    Admin, ADMIN, ADMIN

    User, agent-1, agent-1, -, AGENT1

    User, boss-1, boss-1, BOSS1 

    User, boss-2, boss-2, BOSS2

    User, agent-2, agent-2, -, AGENT2

    User, agent-3, agent-3, -, AGENT3

];

Section Application;

star is *;

LOAD * INLINE [

AREACODE, bosscode

BOSS1, 001956

BOSS2, 001957

BOSS3, 001958

-, DUMMY

];

LOAD * INLINE [

AGENTCODE, agentcode

AGENT1, 100300

AGENT2, 200300

AGENT3, 300300

AGENT4, 400300

];

where 001956 is the value of field "bosscode" in the qlik document for boss area for user "boss-1" and 100300 is the value of field "agentcode" in the qlik document for user "agent-1".

something seems to work: boss area "boss-1" is working with access and reduction data, I can login and the field "bosscode" is filtered with the value "001956".

But the filter on agent do not work.... I do not know why.

Please help me.

Thanks!

Miguel_Angel_Baeyens

Hi Dario,

I have the same section access in the attached file and seems to be working fine. Is that correct?

Miguel

Not applicable

hello Miguel,

i had some problem with you document and Qlik 8, but I have a demo of Qlik 10 that open it.

I do not understand why you say that work fine, because I can login on the document but i cannot see any data and any filter....what i am doing wrong?

Thanks!

Not applicable

hello!

i found the problem!

I found and read the guide "introduction to section access" here in the community and my problem was like the example 6 (about Oceania).

I add some boss-area connected with agent-1 and then use * as AREACODE on every agent listed in section access.

Now the reduction is working for both boss areas and agents!