Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
suzel404
Contributor

Section Access AD user and Custom user

Hi all,

I want to set up section access in qv with custom user and domain users.

custom user are create in local qv machine and domain users are in the domain AD.

I want to set up the security where domain user access to the report and see only the country and custom user see the report with the country.

Is it possible to mix user create in local machine of qvserver and users created in Domain AD in one table ?

Is this code below is correct and optimized ?

Section Access;

LOAD

        UPPER(ACCESS) AS ACCESS,

        UPPER(USERID) AS USERID,

        UPPER(PASSWORD) AS PASSWORD,

        UPPER(COUNTRY) AS COUNTRY,

        UPPER(REDUCTION) AS REDUCTION INLINE [

    ACCESS, USERID, PASSWORD, NTNAME, REDUCTION

    ADMIN, admin, admin, , *

    ADMIN, , ,DOMAIN\adminDB, *

    USER, user1, user1, ,1

    USER, , ,DOMAIN\test1, 2

    USER, , ,DOMAIN\test1, 1

    USER, , ,DOMAIN\test2, 3

    USER, , ,DOMAIN\test3, 2

    USER, , ,DOMAIN\test3, 3

];

Section Application;

Star is *;

RD_COUNTRY:

LOAD * INLINE [

REDUCTION, COUNTRY_ID

1,1

2,2

3,3

4,4

];

SALES_COUNTRIES

LOAD * INLINE [

COUNTRY_ID, SALES

1, 100

2, 200

3, 4646

4, 755

5, 422];

Thanks,

Regards.

1 Solution

Accepted Solutions

Re: Section Access AD user and Custom user

No idea, really.

Because there is no connection between Section Access (OPERATOR_ID) and the COUNTRY_ID field, there won't be any reduction for anyone, so everyone should be able to see everything.

Are you sure this is the correct script?

Peter

View solution in original post

17 Replies
michael_anthony
Contributor II

Re: Section Access AD user and Custom user

It looks okay other than:

UPPER(COUNTRY) AS COUNTRY,


should probably be referencing NTNAME as the COUNTRY reference is applicable in the application section.


Have you tried testing the code, does it work?

suzel404
Contributor

Re: Section Access AD user and Custom user

Hi Michael,

Not yet, I'll tried at noon.

Thanks you for your response.

suzel404
Contributor

Re: Section Access AD user and Custom user

Hi Michael,

My script is the following :

Section Access;

LOAD

    UPPER(ACCESS)  AS ACCESS,

    UPPER(USERID)  AS USERID,

    UPPER(PASSWORD) AS PASSWORD,

    UPPER(NTNAME) AS NTNAME,

    UPPER(REDUCTION) AS REDUCTION

FROM  $(vFile)Gestion_Droit_Utilisateurs_QlikView.xlsx (ooxml, embedded labels, table is SECURITY_USERS);

Section Application;

Star is *;

REDUCTION_OPERATOR:

LOAD * INLINE [

    REDUCTION, COUNTRY_ID

    1, 1

    2, 2

    3, 3

    7, 4

    5, 5

    4, 4

    14, 14

    22, 22

    16, 16

    25, 25

    26, 26

    27, 27

    23, 23

    18, 18

    17, 17

    19, 19

    20, 20

    21, 21

    8, 8

    9, 9

    10, 10

    11, 11

    12, 12

    13, 13

    15, 15

    28, 28

    24, 24

];

COUNTRY:

LOAD

    ID,

    COUNTRY_ID

FROM $(vBase)COUNTRY.qvd (qvd);

I reload , copy and paste the qvw in user document.

I received this message in boucle when I tested NTNAME Security.

Is the some modifications on the QV Server ?

Regards,

Re: Section Access AD user and Custom user

Yes, it is possible to mix Custom users and AD users in the same Section Access table. However, Custom users are something special in QlikView and I don't think you're really talking about QlikView Custom users. It seems that you want to define local Windows users on the server machine? In that case, define them in Manage->Local Groups and Users and add their ID's to the NTNAME column with the machine name prefixed, like:

MachineName\LocalUser

DomainName\DomainUser

If you do want to add QlikView Custom users to your set-up, first in QMC define a DSC and add the users to the list in that same panel. Note that a default domain of "CUSTOM" will be suggested to collectively identify these users as Custom users.

In Section Access, now add them to the NTNAME column like this:

MachineName\LocalUser

DomainName\DomainUser

CUSTOM\CustomUser

Using USERID and PASSWORD is something else entirely (those aren't called Custom users). Those users are defined just for this document (or for every document that loads them from an external source). They do not exist outside of QlikView documents, and as such cannot be assigned file permissions or QlikView server properties. You can mix these with the preceding by adding columns USERID and PASSWORD to your Section Access table, just like you did in your OP.

As suggested by Michael Anthony, include the NTNAME column in your LOAD statement. You are currently ignoring the data from the INLINE table.

Best,

Peter

suzel404
Contributor

Re: Section Access AD user and Custom user

Thank you Peter.

I use a xls file like this :

   

ACCESSNTNAMECOUNTRY_ID
ADMINDOMAIN\AdminDB*
USERDOMAIN\login1*

---

SECTION ACCESS;

LOAD

    ACCESS,

    NTNAME,

    OPERATOR_ID

FROM $(vFile)Gestion_Droit_Utilisateurs_QlikView.xlsx (ooxml, embedded labels, table is LOGIN);

STAR IS *;

SECTION APPLICATION;

LOAD

     COUNTRY_ID

FROM $(vBase)Country.qvd (qvd);

With the login1 I can't see all countries. only 5! With load inline I have no problem.

Why can I see only 5 countries ?

Regards,

Re: Section Access AD user and Custom user

No idea, really.

Because there is no connection between Section Access (OPERATOR_ID) and the COUNTRY_ID field, there won't be any reduction for anyone, so everyone should be able to see everything.

Are you sure this is the correct script?

Peter

View solution in original post

Re: Section Access AD user and Custom user

Also keep in mind that your STAR statement only affects subsequent LOAD/SELECT statements. Because it seems that '*' only appear in a table created before the STAR statement, those stars will not behave like wildcards.

Moreover, if you are testing this set-up in QV Desktop, you should be aware that User IDs with role ADMIN will always break data reduction.

Peter

suzel404
Contributor

Re: Section Access AD user and Custom user

Thank you for your response.

It is weel COUNTRY_ID

What is the caracter if I want the user see ALL countries ?

Joshua

Re: Section Access AD user and Custom user

Yes, It is possible if you want to do that way

But, here i didn't understand this about Sales. This Sales is field right?

SALES_COUNTRIES

LOAD * INLINE [

COUNTRY_ID, SALES

1, 100

2, 200

3, 4646

4, 755

5, 422];

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)