Hi All,

Is it possible to setup RLS based on Related Tables?  I am trying to 
setup RLS on the employee table(EmplTable), based on Data in the 
Employment History(HRMVirtualNetworkHistory). The History Table is 
not directly related to the employee Table, but is related through 
the People in the Network(HRMVirtualNetworkTable).  The specific 
field that will be used for the filter is the Organisation Unit.  The 
Org. Unit will be associated with a Company.

The relations look like this:

EmplTable 1---1 HRMVirtualNetworkTable 1---< HRMVirtualNetworkHistory

My requirement is that I need to setup RLS so that when a user logs 
in to a Company, only employees that were associated to that company 
are visible.  

I have tried the adding the RLS on Employee Table, by adding the two 
other tables to my query, and setting a filter on Org. Unit in the 
Employment History table, but I still get all records when I log in 
to the company.  

Can anyone suggest anything or if anyone who has faced a similar 
issue ca suggest any pointers, it will be greatly appreciated.

Regards
Meherab

Reply via email to