Standard Package DBMS_RLS can be used to add, delete, enable, disable, refresh VPD policies.
dbms_rls.add_policy('APPS','PO_HEADERS_V','accesscontrol_PO_HEADERS','system','f_policy_po,sec_relevant_cols=>'ORDER_AMOUNT',sec_relevant_cols_opt => dbms_rls.ALL_ROWS);
Parameter 1 - object owner
parameter 2 - Object Table/ View Name
Parameter 3 - Policy Name
parameter 4 - schema of the policy function
Parameter 5 - database function which returns a where clause as string (the function will have the logic to restrict the records to be fetched)
sec_relevant_cols - the column of which the data is restricted from viewing to the user
sec_relevant_cols - setting it to dbms_rls.ALL_ROWS would display all the rows to a user with blank data shown for the restricted column for the records which are non viewable.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment