Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
There are a few ways to handle this. Here is one:
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
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?
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
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?
See post below.
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?
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
Mark
There are a few ways to handle this. Here is one:
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
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...
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;