Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Section Access does not work with user groups

Hi there

I'm trying to use section access but I don't manage to make it work. Every user group should have exactly one possible selection out of three. All other selections shall be hidden.

I defined user groups on the server and added them in QMC > Users > Section Access Management like this:

NTNAME                  ACCESS

Server42\Group1         USER

Server42\Group2         USER

Server42\Group3         USER

Server42\AdminGroup     ADMIN

Each group has several users, e.g.

Group 1: Bob, Alice

Group 2: John, Max

Group 3: Ernie, Bert

AdminGroup: Chuck, BOFH

The user which is used to run the publish task in QMC has been added under Add users... to give him admin rights.

I've added the following coding to my script:

Section Access;

LOAD ACCESS, NTNAME

FROM [http://Server42:4780/QMS/AuthTable]

(html, utf8, embedded labels);

Section Application;

STAR IS *;

LOAD * INLINE [

     NTNAME, Selection

     Server42\Group1, Select_1

     Server42\Group2, Select_2

     Server42\Group3, Select_3

     Server42\AdminGroup, *

]

I've activated Settings > Document Properties > Opening > Initial Data Reduction Based on Section Access.

If I choose Strict Exclusion all users get the message that the file cannot be opened (obviously because it doesn't find a matching Selection), if I untick Strict Exclusion we see all possible Selections.

I've created a table with NTNAME and Selection in QV and all the matches are shown like I want them. It seems that QV isn't able to link the user who opens the QV (in Web Access Point) with the group he belongs to.

The only other thing I do in the script is a binary load, which has to be in line 1 (otherwise it doesn't work).

Has anyone got an idea what I did wrong or is it just not possible to use user groups for section access?

Hope you can help.

Regards

Sabine

1 Solution

Accepted Solutions
chauhans85
Esteemed Contributor

Re: Section Access does not work with user groups

make NTname in upper

Section Access;

LOAD ACCESS, Upper(NTNAME) as NTNAME

FROM [http://Server42:4780/QMS/AuthTable]

(html, utf8, embedded labels);

Section Application;

STAR IS *;

Tab1:

LOAD * INLINE [

     NTNAME, Selection

     Server42\Group1, Select_1

     Server42\Group2, Select_2

     Server42\Group3, Select_3

     Server42\AdminGroup, *

]

Load

upper(NTNAME) as NTNAME,

Selection,

1 as j

resident Tab1;

drop table Tab1;

hope this helps

5 Replies
chauhans85
Esteemed Contributor

Re: Section Access does not work with user groups

make NTname in upper

Section Access;

LOAD ACCESS, Upper(NTNAME) as NTNAME

FROM [http://Server42:4780/QMS/AuthTable]

(html, utf8, embedded labels);

Section Application;

STAR IS *;

Tab1:

LOAD * INLINE [

     NTNAME, Selection

     Server42\Group1, Select_1

     Server42\Group2, Select_2

     Server42\Group3, Select_3

     Server42\AdminGroup, *

]

Load

upper(NTNAME) as NTNAME,

Selection,

1 as j

resident Tab1;

drop table Tab1;

hope this helps

Not applicable

Re: Section Access does not work with user groups

Hi Sunil

Thank you for your quick response! It seems to help, as an admin I get now all Selections using Strict Exclusion (previous no file access). I'll check with my Group users on friday if selection is restricted for them and I'll keep you informed.

Best regards

Sabine

Not applicable

Re: Section Access does not work with user groups

Hi,

I've checked with one of my group users but unfortunately he still sees all selections. Any ideas?

BR

Sabine

Not applicable

Re: Section Access does not work with user groups

Hi,

Try double loading the NTNAME field and aliasing it as something else. Are you sure that user is not in a member of the admin group?

KR,

K

Not applicable

Re: Section Access does not work with user groups

Hi,

yes the user is definitely not an admin. I've tried several things and suddenly it worked. My code looks like this now:

Section Access;
LOAD Upper(ACCESS) as ACCESS, Upper(NTNAME) as NTNAME, REDUCTION FROM
[http://Server42:4780/QMS/AuthTable]
(html, utf8, embedded labels);

Section Application;
STAR IS *;

[AuthTable]:
LOAD * INLINE [
      NTNAME, Selection
      SERVER42\GROUP_1, Select_1
      SERVER42\GROUP_2, Select_2
      SERVER42\GROUP_3. Select_3
      SERVER42\ADMINGROUP, *
];

On the Server I've set REDUCTION for field Selection for all USER.

It didn't work when I tried your coding Sunil but I guess you where right: with changing the Users in Section Application to upper case it started to work.

Thank you both for your help!

BR

Sabine

Community Browser