Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

QlikView Section Access, <ANY> works for ADMIN, fails for USER

Hi all,

I have a model, with a list of countries {USA, UK, GERMANY}.

I have made restrictions for access on reduced data (countries) and Sheets.

Section Access;

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, PROFILE, COUNTRY

    ADMIN, ADMIN, 999, FULL, <ANY>

    USER, USER1, 111, VIEWER-HIGH, UK

    USER, USER2, 222, VIEWER-LOW, <ANY>

];

Section Application;

LOAD * INLINE [

PROFILE, SHDASHBOARD, SHSALES, SHWHATIF, SHTIME, SHBASKET, SHCOMPARE, SHREPORT

FULL, 1, 1, 1, 1, 1, 1, 1

VIEWER-HIGH, 1, 0, 1, 0, 1, 0, 0

VIEWER-LOW, 1, 0, 0, 0, 0, 0, 1

];

All is working fine on ADMIN and USER1, however, USER2 cannot access the application.
If I switch the COUNTRY for USER2 to a country, it works fine.
Is there a reason <ANY> wont work for users? Did anyone encounter this before?

Thanks

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

There are a few ways to handle this. Here is one:

  • Rename the COUNTRY field in SA into PERMISSION.
  • Create a Section Application-table that links PERMISSION to COUNTRY.

You should be able to figure that out on your own (if you did read up on Section Access before jumping in), but anyway - here is an example:

Section Applicaiton;

:

Permissions: // First link all individual PERMISSION values to corresp. Countries

LOAD COUNTRY AS PERMISSION,

     COUNTRY

RESIDENT WhereverAllYourCountriesAreListed;

CONCATENATE (Permissions) // Next map the wildcard <ALL> value to all possible countries

LOAD DISTINCT COUNTRY, '<ALL>' AS PERMISSION

RESIDENT WhereverAllYourCountriesAreListed;

:

Replace the source table name with the table that contains all possible countries. This usually is a Facts table of some sort.

Best,

Peter

View solution in original post

11 Replies
swuehl
MVP
MVP

Don't you have a field COUNTRY also in your section application, for data reduction?

How do the field values of COUNTRY field look like?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Did you map the value <ANY> to all country codes somewhere in Section Application; ? Otherwise, no-one with value <ANY> will be able to access this document in the AccessPoint, and ADMIN will only be able to open the document in QV Desktop (Role=ADMIN overides any reduction in QV Desktop)

Peter

Not applicable
Author

COUNTRY field is as expected

COUNTRY
US
UK
GERMANY
ISRAEL
FRANCE
.

.

.

.

etc

How should I map it so the admin will have permissions for all countries, user1 to UK and user2 to all countries as well?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

See post below.

Not applicable
Author

Of course I looked at it.
Can you explain how to map a value to have many values in it?
if I understand correctly, the value '<ANY>' will actually hold all the values of all countries and therefore will grant the permissions for all the countries, is that true? How do I do that?

Mark_Little
Luminary
Luminary

As Peter said,

Basically admin has full access by default, but the user group has limited and the term <Any> does not relate to anything in the country field.

i tend to approach this by creating an dummy user something like below

Capture.JPG

Mark

Peter_Cammaert
Partner - Champion III
Partner - Champion III

There are a few ways to handle this. Here is one:

  • Rename the COUNTRY field in SA into PERMISSION.
  • Create a Section Application-table that links PERMISSION to COUNTRY.

You should be able to figure that out on your own (if you did read up on Section Access before jumping in), but anyway - here is an example:

Section Applicaiton;

:

Permissions: // First link all individual PERMISSION values to corresp. Countries

LOAD COUNTRY AS PERMISSION,

     COUNTRY

RESIDENT WhereverAllYourCountriesAreListed;

CONCATENATE (Permissions) // Next map the wildcard <ALL> value to all possible countries

LOAD DISTINCT COUNTRY, '<ALL>' AS PERMISSION

RESIDENT WhereverAllYourCountriesAreListed;

:

Replace the source table name with the table that contains all possible countries. This usually is a Facts table of some sort.

Best,

Peter

Not applicable
Author

Thank you for your reply Mark.

I am new to QlikView so these are a bit non elementary yet.
So, Basically what I need to do is the following:

Section Access;

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, PROFILE, COUNTRY

    USER, DUMMY, 000, FULL, USA

    USER, DUMMY, 000, FULL, UK

    USER, DUMMY, 000, FULL, GERMANY

    USER, DUMMY, 000, FULL, ISRAEL

    USER, DUMMY, 000, FULL, FRANCE

    ADMIN, ADMIN, 999, FULL, *

    USER, USER1, 111, VIEWER-HIGH, UK

    USER, USER2, 222, VIEWER-LOW, *

];

Section Application;

LOAD * INLINE [

PROFILE, SHDASHBOARD, SHSALES, SHWHATIF, SHTIME, SHBASKET, SHCOMPARE, SHREPORT

FULL, 1, 1, 1, 1, 1, 1, 1

VIEWER-HIGH, 1, 0, 1, 0, 1, 0, 0

VIEWER-LOW, 1, 0, 0, 0, 0, 0, 1

];


What if tomorrow I have a new Country in the list?
How would I do this?
Maybe 'ALL' is a saved Command that I am not familiar with...

Not applicable
Author

Hi Peter, thank you. This is a good progress.
Still the same result.
What could it be?

Section Access;

_Users:

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, PROFILE, _PERMISSION

    ADMIN, ADMIN, 999, FULL, <ANY>

    USER, USER1, 111, HIGHVIEWER, UK

    USER, USER2, 222, LOWVIEWER, <ANY>

];

Section Application;

_Profiles:

LOAD * INLINE [

     PROFILE, ShDashboard, ShSales, ShWhatIf, ShTime, ShBasket, ShBudget, ShCompare, ShReport
     FULL, 1,1,1,1,1,1,1,1

     HIGHVIEWER, 1,0,0,0,0,0,1,1

     LOWVIEWER, 1,0,0,0,0,0,0,1

];

_Permissions:

LOAD Upper(Country) AS _PERMISSION,

     Upper(Country) AS COUNTRY

RESIDENT Customers;

CONCATENATE (_Permissions) // Next map the wildcard <ALL> value to all possible countries

LOAD DISTINCT Upper(Country) as COUNTRY, '<ALL>' AS _PERMISSION

RESIDENT Customers;