Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all, How would one go about setting up section access based on more than one Dimension/Field?
I have the setup below but need to add an additional restriction (lets Call it OFFICE with Office_X and Office_Y).When I add an Office field to the Application below I get an error load about a circular loop in my model.
Any idea on what the syntax should look like in order to restrict data on an 'Office field' as well?
//Need to create a User that has access based on OFFICE?:
//Per Company
section Access;
LOAD * INLINE
[
ACCESS, USERID, PASSWORD, COMPANY
ADMIN, ADMIN, ADMIN
USER, PowerUser, letmein, *
USER, CompanyUser_X, letmein, X
USER, CompanyUser_Y_, letmein, Y
];
Section Application;
load * inline
[
COMPANY, Company
X, Company_X
Y, Company_Y
];
Hi,
have you one example? with cases where one user can see all data in one field?
thanks
Hi,
This is the basic one, but works:
SECTION ACCESS; STAR IS *; Users: // label not needed, just for traceabilityLOAD * INLINE [ACCESS, USERID, PASSWORD, CODE ADMIN, ADMIN, ADMINUSER, USER1, USER1, ESUSER, USER2, USER2, USUSER, USER3, USER3, RUUSER, USER4, USER4, BRUSER, USER4, USER4, DEUSER, USER5, USER5, *]; SECTION APPLICATION; Countries:LOAD * INLINE [CODE, NameES, SpainBR, BrazilUS, United StatesRU, RussiaFR, FranceDE, GermanyUK, United KingdomIE, Ireland];
In this example, ADMIN will be able to see all countries. All users are allowed to see just one country except for USER4, who is allowed to see both BR and DE, and -at the moment- USER5 who is allowed to see all listed values (ES, US, RU, BR, DE) but not all values (not allowed to FR, UK, IE).
Now say you want USER6 to be able to see all countries. Then, the following lines must be added to the section access script:
USER, USER6, USER6, FRUSER, USER6, USER6, UKUSER, USER6, USER6, IEUSER, USER6, USER6, *
Now, once that USER6 is added, USER5 will also be allowed to see all countries, because all posible values for "Code" are listed in the section access. Further users with access to all countries will only need one line
USER, USER7, USER7, *
Say you want restrict USER5 to see only IE, then you have to change its line to
USER, USER5, USER5, IE
Finally, the complete script will look like
SECTION ACCESS; STAR IS *; Users: // label not needed, just for traceability LOAD * INLINE [ ACCESS, USERID, PASSWORD, Code ADMIN, ADMIN, ADMIN USER, USER1, USER1, ES USER, USER2, USER2, US USER, USER3, USER3, RU USER, USER4, USER4, BR USER, USER4, USER4, DE USER, USER5, USER5, IEUSER, USER6, USER6, FRUSER, USER6, USER6, UKUSER, USER6, USER6, IEUSER, USER6, USER6, *USER, USER7, USER7, *]; SECTION APPLICATION; Countries: LOAD * INLINE [ Code, Name ES, SpainBR, BrazilUS, United StatesRU, RussiaFR, FranceDE, GermanyUK, United KingdomIE, Ireland];
Hope that helps
Hi Miguel,
thanks for the example, it works but you must write CODE and not Code
But my problem is not when I have one field to reduce the data, but more fields.
I try this script for my problem:
SECTION ACCESS;
LOAD * INLINE [
ACCESS, USERID, PASSWORD, CODE
ADMIN, ADMIN, ps
USER, USER0, ps,ES-Madrid
USER, USER1, ps, ES-Barcellona
USER, USER2, ps, UK-London
USER, USER3, ps, ES-all
USER, USER4, ps, all-all
];
SECTION APPLICATION;
STAR IS *;
LOAD * INLINE [
CODE, Nation, City
ES-Barcellona, Spain, Barcellona
ES-Madrid, Spain, Madrid
UK-London, United Kingdom, London
ES-all, Spain, *
all-all, *, *
];
Logicaly it must work (in my mind :-))
can you help me?
Thank you for your patience.
marcobombo wrote:thanks for the example, it works but you must write CODE and not Code
Checked.
And yes, that's the only way to get more than one field in section access, creating a key that identifies every possible combination you want the information be reduced, and use that key as reduction field, instead of CODE in my sample above.
Hope that helps.