Consultor Eletrônico



Kbase P125117: How to hide sensitive records based on userid using Database trigger?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   30/07/2007
Status: Unverified

GOAL:

How to hide sensitive records based on userid using Database trigger?

GOAL:

How to restrict sensitive records based on userid using Database trigger?

GOAL:

How to hide sensitive records based on user login with 4GL trigger?

GOAL:

How to restrict sensitive records based on user login with 4GL trigger?

GOAL:

How to hide sensitive records using 4GL trigger?

GOAL:

How to hide sensitive records based on Database trigger?

GOAL:

How to hide sensitive records based on user login?

FIX:


Follow the steps below to accomplish the task:

1. Create users using the Data Administration > Admin > Security > Edit User List...
2. Add the following find trigger on the customer table:

The following simple FIND trigger is based on sports2000 database. You can customize the trigger based on your business requirements. You can have a list of userid on a separate file as well.

/**************************************************************/
TRIGGER PROCEDURE FOR FIND OF Customer.
DEFINE VARIABLE cAuthorizedUserList AS CHARACTER NO-UNDO.

ASSIGN
cAuthorizedUserList = "jack,jill,pat,rob".
IF ( balance > 1000) AND NOT CAN-DO(cAuthorizedUserList, USERID) THEN

RETURN ERROR.

/***************************************************************/