Implementing VPD grouped policies
There may be cases where you want to use different VPD policies on the same object. In such cases VPD offers a feature named grouped policies that can be used to assign policies to different groups and to trigger them depending on certain conditions. Enabling one policy or another will be decided by a driver context according to certain parameters declared at the application level. The following recipe will demonstrate how to use this VPD feature.
In this recipe we will create a table that will contain three different department groups.
We will create a new user STOBIAS
in addition to the DOCONNEL
and JWHALEN
users created earlier, in order to have one user for each group of departments. For each group of departments a group policy will be defined. These grouped policies will isolate the role of each group based on user membership. Each user will see his department determined by a driver context.
Getting ready
All steps will be performed on the database HACKDB...