Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Section Access based on Role and Country

Hi everyone,

I am new to QlikView. I have a doubt regarding the section access in a dashboard.

Actually, the section access is based on Role and Country.There are mainly 3 roles and 7 countries..Global Admin,Country admin and Normal User are the 3 roles.The login user details like User Id,Name,Role and Country is taken from 3 different SharePoint sites,each for 3 different roles.If the user is a global admin,he should be able to see the other user's details based on their country,and also Global admin doesnot have a country of his own.i.e, Clobal Admin should be able to select country and see the entire user\s details of that country.

Country Admin should be able to see the respective country's users details only.How can i restrict the data based on role and country.

Waiting for valuable responses..

I have implemented the following code,but its not working.

Sp_Data:

LOAD

           SubField(ows_User,'#',2)                                   as             [Emp Name],

           upper(ows_User_x0020_ID)                               as             NTNAME,      

            ows_Deactivate_x0020_this_x0020_User           as            [Deactivate this User?],

           'Global_admin'                                                   as             ROLE

from

SPSite for Global Admin;

Concatenate(Sp_Data)

load

      SubField(ows_User,'#',2)                            as             [Emp Name],

      upper(ows_User_x0020_ID)                        as             NTNAME,

      ows_Deactivate_x0020_this_x0020_User     as            [Deactivate this User?],

      ows_Country                                              as            Country_R,

      'Country_admin'                                          as             ROLE

from

SPSite for Country Admin;

Concatenate(Sp_Data)

LOAD

           SubField(ows_User,'#',2)                              as             [Emp Name],

           upper(ows_User_x0020_ID)                             as             NTNAME,

            ows_Deactivate_x0020_this_x0020_User            as            [Deactivate this User?],

           ows_Country                                    as             Country_R,

           'Normal_User'                                    as             ROLE

from

SPSite for Normal User;

Section Access;

Star is *;

Role_Access:

LOAD

    Upper(NTNAME)                                     as NTNAME,

    Upper(ROLE)                                      as ROLE,

    if(Upper(ROLE) = 'GLOBAL_ADMIN','*', Country_R) as Country_R

Resident Sp_Data;

Section Application;

Competency_Final:

LOAD * INLINE [

    ROLE, COMPTENCY

    NORMAL_USER, 0

    COUNTRY_ADMIN, 1

    GLOBAL_ADMIN, 2

];

COMPTENCY field is used to restrict the sheet objects to users based on Role.

1 Reply
marcus_sommer

Your section access is missing the field ACCESS which could have ADMIN or USER as values - more specific roles aren't possible and the authorization will be made through the values within the KEY field from the section access and section application part.

I suggest that you made a BACKUP from your applications and/or creates a small dummy-app to test your approaches step by step (this meant at first the data-site and only if they work you goes to any sheet/object restrictions). Before that read carefully the postings from here: Section Access especially the introduction.

- Marcus