Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
parthakk
Contributor II

Section Acces Issue - Qlik Sense

Hi Everyone,

I have a scenario where i need to restrict access to users on 8 fields. And i am restricting them as shown in image.

However when one particular user 'User5' has restriction for value 'MNO'.

If this particular(MNO) value does not exist in my application then he is getting full access instead of denying the access.

Kindly suggest how to do i make sure that user is not getting the access to application.

Thanks,

Partha K

10 Replies
Khan_Mohammed
Honored Contributor II

Re: Section Acces Issue - Qlik Sense

Hi,

Can you paste your Section Access Script here?

And I believe Section Access in Qlik Sense is different that Qlik view.

Most of the settings are to be done in QMC Security rule for the App.

But I believe you can also limit the access through the Section Access Script.

https://qlikcentral.com/2016/05/31/setting-up-security-rules-in-qlik-sense-qmc/

https://help.qlik.com/en-US/sense/1.1/Subsystems/ManagementConsole/Content/ServerUserGuide/SUG_Confi...

parthakk
Contributor II

Re: Section Acces Issue - Qlik Sense

Hi Arvind,

I am aware of certain things that are different in qlikview and qliksense for section access.

Following is the script that i have used.

Section Access;

Load

     "ACCESS",

     "USERID",

     Field1,

     Field2,

     Field3,

     Field4,

     Field5,

     Field6,

     Field7,

     Field8

FROM [lib://Connection/ADUsers - V1.qvd]

(qvd);

Section Application;

parimikittu
Contributor II

Re: Section Acces Issue - Qlik Sense

Hi, Firstly, we should not restrict user based on 8 fields, it is not a good practice. We should try to reduce these to one or two based on the data model. So please paste data model, only then we will be able to help you

parthakk
Contributor II

Re: Section Acces Issue - Qlik Sense

Hi, for me its mandatory to restrict on 8 fields, i have got no option on that.

And there is nothing as datamodel as such. I have got just one table. thats it

parimikittu
Contributor II

Re: Section Acces Issue - Qlik Sense

Does the eight fields are from single table or different tables? Data model is very import in this scenarios.

Khan_Mohammed
Honored Contributor II

Re: Section Acces Issue - Qlik Sense

As VJ mentioned you'd need a Data Model/Fact Table to restrict a user based on fields.

Try this

STAR is *;


SECTION Access;

USER:

Load

     "ACCESS",

     "USERID",

     Field1,

     Field2,

     Field3,

     Field4,

     Field5,

     Field6,

     Field7,

     Field8

FROM [lib://Connection/ADUsers - V1.qvd]

(qvd);

LOAD * INLINE [

   USERID, NTNAME,  FIELDNAME, ACCESS

    YourServiceAccountUserID, YourServiceAccountNTNAME, SERVICEACNT, *, ADMIN

    USER1, TheirNTNAME, *, *,  USER

    USER2, TheirNTNAME, *, *, USER

    USER3, TheirNTNAME, *, *,  USER

    USER4, TheirNTNAME, *, *,  USER

];

SECTION Application;

In above script

you can give like below

USERID, NTNAME,  FIELDNAME, ACCESS

PARTHA KULKARNI, DOMAIN\PARTHA, FIELD2, USER

PARTHA, DOMAIN\PARTHA, *, ADMIN

and so on....

First name Partha Kulkarni will be considered user based upon access, and NTNAME (ntname is important here and highly recommended for restricting and best practice) and this user can only see Field2

Second name Partha is an Admin and * will means there are no restrictions for this user.


This should work if you don't have thousand of different values.

As Field1,2,3,4,5.... are Fields and not values so you will have to enter Field1, Field2, Field3 instead of Field name and then give the value below that

USERID, NTNAME, ACCESS, Field1, Field2, Field2.....Field5, ACCESS

Username, Domain\User5, *,*,*.....,MNO, User

Above the user5 will be restricted to MNO in Field5 and other fields will be available for him.

If you want to do it reverse then

Give the field names in Field1,2,3,4,6,7,8 and * on Field5

I believe this should work.

If it doesn't then can you post a sample file and data?

There are other few different scripts based upon the data. Is it large volume or just few fields.

and 1 field from your fact should be matching to a field you want to restrict in section access, in this case Field names you've.

ashishbp
New Contributor

Re: Section Acces Issue - Qlik Sense

Hi Partha,

Did u get any solution for this?

I am also facing the same issue.

manojkumar_mk
New Contributor II

Re: Section Acces Issue - Qlik Sense

Hi,

I have seen your Script, writing all fields in section access it's better than to maintain excel file.

create a excel file as per below screen shot:

Capture2.PNG

Upload your excel sheet into script and write two keywords: 1. Section Access and 2. Section Application

1. Define your section access fields with Upper or Capitalize

2. Make sure you should map your section access file to QVD basis on Field which you are going to restrict and define same field with Upper or Capitalize in QVD.

3. Once check is there any space before or after. if it is having then your section access will be fail.

(* Point 3 is very important, please check in your data).

Ex:

Section Access;

Load

          Upper(UserID) as "USERID",

          Upper(Access) as "ACCESS",

              UserName,

               Upper(Filed)

From:/Excel/SHeet1.XLMX)

Section Application;

Khan_Mohammed
Honored Contributor II

Re: Section Acces Issue - Qlik Sense

Whats your section access script? @Ashish.