Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everybody,
I have already set up Section Access.
In this case, an order is checked to determine whether a representative is stored with his ID. The ID is stored in a user directory with a user name, which is then compared with the user name when logging in. Everything works perfectly.
Now I would like to display customers on a separate page. The representative may only see those customers for whom he is stored with his representative ID. So actually just like with the customer.
But what do I have to enter in Section Access so that he checks the first condition that he only sees his orders (representative ID in the order) but also checks which customers he is allowed to see (representative ID in the customer)?
Here is the script:
V_BelegKopfVert_ACCESS:
NoConcatenate
LOAD *, UPPER(TEXT(V_BelegKopfVert.ypA_VornameName)) as %ZUGRIFF
RESIDENT V_BelegKopfVert;
DROP TABLE V_BelegKopfVert; RENAME TABLE V_BelegKopfVert_ACCESS TO V_BelegKopfVert;
ACCESS:
LOAD * INLINE [
ACCESS,USERID
USER,DOMAIN\test.user
USER,INTERNAL\sa_scheduler
];
JOIN
LOAD DISTINCT
V_BelegKopfVert.ypA_VornameName
RESIDENT V_BelegKopfVert;
Concatenate(ACCESS)
LOAD DISTINCT
'USER' as ACCESS,
DOMAIN&"USERID" as USERID,
VERTRETER as V_BelegKopfVert.ypA_VornameName
FROM [lib://Prod_71e/data/external/xls/SECTION_ACCESS_VERTRETER.xlsx]
(ooxml, embedded labels, table is Tabelle1);
NoConcatenate
TMP:
LOAD
UPPER(TEXT(ACCESS)) as ACCESS,
UPPER(TEXT(USERID)) as USERID,
UPPER(TEXT(V_BelegKopfVert.ypA_VornameName)) as %ZUGRIFF
RESIDENT ACCESS;
Concatenate(TMP)
LOAD * INLINE [
ACCESS,USERID,%ZUGRIFF
USER,DOMAIN\TEST,TEST
];
DROP TABLE ACCESS;
SECTION ACCESS;
NoConcatenate
ACCESS:
LOAD *
RESIDENT TMP;
SECTION APPLICATION;
DROP TABLE TMP;