Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
suzel404
Creator
Creator

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.

17 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

If so, then add COUNTRY_ID to your Section Access table instead of OPERATOR_ID.

Next, put the STAR IS statement before the Section Access table LOAD that contains asterisk characters. Otherwise they will not be flagged as wildcards, and they will remain simple asterisks.

Finally, and this is the most difficult step: a wildcard in Section Access will only work for the values listed in the current table load. If there are only wildcard characters in your table and no real country IDs, the wildcards will map to no other value. This is because a Section Access field will NOT be merged with a Section Application field with the same name. So the wildcards in your Section Access table will only translate to all other values in the same Section Access table, not to the remaining values in the nameless table in Section Application.

You can solve this and make the wildcards work again by adding all the remaining COUNTRY_ID values from Country.qvd to your Section Access table. Add dummy (non-existent) values for the other columns ACCESS and NTNAME and your document should be good to go with functioning wildcard specifications.

Best,

Peter

suzel404
Creator
Creator
Author

Sorry  my original script is :

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

     OPERATOR_ID,

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

suzel404
Creator
Creator
Author

Attachment.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Your situation is becoming more and more confusing (cf. your last reply below...)

Anyway, the following link table LOAD may fix your problem mapping some users (with a particular OPERATOR_ID) to specific values, and other - more administrator-type - users mapping to all link values. Use this as a template to create your own solution.

Section Access;

LOAD ACCESS,

     NTNAME,

     OPERATOR_ID AS OPERATOR_LINK

FROM $(vFile)Gestion_Droit_Utilisateurs_QlikView.xlsx

     (ooxml, embedded labels, table is LOGIN);

// STAR IS *; // Forget about this ! see my earlier comment

Section Application;

LinkTable:

LOAD OPERATOR_ID AS OPERATOR_LINK,

     OPERATOR_ID

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

CONCATENATE (LinkTable)

LOAD DISTINCT

     '*' AS OPERATOR_LINK,

     OPERATOR_ID

RESIDENT LinkTable;

:

Best,

Peter

[Edit] Modified the second LOAD to read from the Resident table.

suzel404
Creator
Creator
Author

Thank you I'll try it tomorrow noon.

Regards,

suzel404
Creator
Creator
Author

I imagine an issue...

DOMAIN\login1 has only access to OPERATOR_ID 1 and 2 in the qvw application 1 and DOMAIN\login1 has only access to OPERATOR_ID 3 , 6, 7 in the qvw application 2. With the unique Excel File. I have a conflit , right ?

What is the best practices to manage section access with users and different security from application data ?

regards,

Peter_Cammaert
Partner - Champion III
Partner - Champion III

That seems like a weird premise, but it can be done. Maybe you should post this question in a new discussion while we try to solve your original issue in this one.

Best,

Peter

suzel404
Creator
Creator
Author

Thank you Peter for your time and response.