Consultor Eletrônico



Kbase P8768: How to use RESULTS "u-table.p" integration point procedure to implement table level security?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   17/01/2005
Status: Unverified

GOAL:

How to use RESULTS "u-table.p" integration point procedure to implement table level security?

FACT(s) (Environment):

Windows

FIX:

The following code demonstrates the use of a RESULTS integration point procedure to implement table level security.

The code will restrict "Jack" from seeing the "Customer" table, "Jill" from seeing the ?Order? table and all other users from seeing the ?Invoice? table:

1. Save the following procedure as SomeName.p in your RESULTS working directory.

DEFINE INPUT PARAMETER dName AS CHARACTER NO-UNDO.
DEFINE INPUT PARAMETER uName AS CHARACTER NO-UNDO.
DEFINE INPUT PARAMETER tList AS CHARACTER NO-UNDO.
DEFINE INPUT PARAMETER aList AS CHARACTER NO-UNDO.
DEFINE INPUT-OUTPUT PARAMETER sList AS CHARACTER NO-UNDO.

DEFINE VARIABLE qbf-i AS INTEGER NO-UNDO.

DO qbf-i = 1 TO NUM-ENTRIES(tList):
IF ENTRY(qbf-i, tList) = "Customer":u AND uName = "Jack" THEN DO:
ENTRY(qbf-i, sList) = "false":u.
NEXT.
END.

IF ENTRY(qbf-i, tList) = "Order":u AND uName = "Jill" THEN DO:
ENTRY(qbf-i, sList) = "false":u.
NEXT.
END.

IF ENTRY(qbf-i, tList) = "Invoice":u THEN
ENTRY(qbf-i, sList) = "false":u.
END.

2. Click Query from RESULTS main menu
3. Click Customize from the Query drop down menu
4. Click Integration Procedures from the Customize Submenu
5. Select Table Security from the Integration Procedures dialog box.
6. Type SomeName.p in the ?Procedure For: Feature Security? Fill-In.
7. Click OK to exit the Integration Procedures dialog box.
8. Exit Results to make the changes take effect.
9. Logon into RESULTS as Jack, Jill and some other user to confirm the restrictions.