Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

jstaples28
New Contributor II

section access in order to reduce/restrict data based on roles

I have a dataset loaded into QV that has full data for the entire workforce since 2003.  I want to give individual users within their affiliations access to THEIR history and THEIR history ONLY.

New roles have been created to drive this security:

Sample Affiliation roles
HDW^HRA^TUB^Comp^BUS
HDW^HRA^TUB^Comp^SPH

Sample Empl_Type roles
HDW^HRA^TUB^Comp^EmplAll
HDW^HRA^TUB^Comp^EmplStaff

Within the dataset, there  is a field called “Access_Affiliation” and another called  “Access_Empl_Type.”

HERE IS WHAT I WOULD LIKE:

1. user needs two roles (one Affiliation role and one Empl_Type role) to see this section.
2. The specific role will drive specific access


a. somebody with the roles below should be able to see only SPH affiliation for all employee groups.
                HDW^HRA^TUB^Comp^SPH
                HDW^HRA^TUB^Comp^EmplAll
b.  somebody with the roles below should be able to see the BUS affiliation and staff only.
                HDW^HRA^TUB^Comp^BUS
                HDW^HRA^TUB^Comp^EmplStaff

I think I need to add a LOAD * INLINE statement like this, but it doesn’t work:

LOAD * INLINE [
RightsGroup, Access_Affiliation
HDW^HRA^TUB^Comp^BUS, BUS
HDW^HRA^TUB^Comp^SPH, SPH
]

LOAD * INLINE [
RightsGroup, Access_Empl_Type
HDW^HRA^TUB^Comp^EmplAll, All
HDW^HRA^TUB^Comp^EmplStaff, Staff
]

2 Replies

Re: section access in order to reduce/restrict data based on roles

You need to create an Authorization key that links the Section Access with the data. This single key must contain information from both Affiliation_role and Empl_Type. Further, it must be able to handle generic keys, e.g lines like {Affiliation_role=specific; Empl_Type=Any}.

Read http://community.qlik.com/blogs/qlikviewdesignblog/2012/10/02/complex-authorization which is similar to what you want to do.

HIC

jstaples28
New Contributor II

Re: section access in order to reduce/restrict data based on roles