Forum Discussion
RLS with Roleplaying
You could potentially do the following:
1. Create 2 different User security tables.
1.a. For users that have no filter on one of the tables, include a row with "All" for that user.
2. Create a bridge table between each security table and the fact table.
2.a. In the bridge table, "All" can be associated with all of the Stores / Suppliers.
3. Apply RLS to both User security tables.
Hope this helps,
Nathan
Thank you for your fast reply Anonymous !
Are you suggesting splitting the Users into two Security Groups?
Security Group1
[email protected]
Security Group 2
Noone is suppose to see everything. Security Group 1(SG1) should see all stores under a certain Supplier.
SG2 should only see specifik Stores.
- Anonymous7 years agoNot applicable
Anonymous - I was thinking of a single security group, with every user in both tables, but I like your idea better. Then you can eliminate the suggested bridge tables and only apply the RLS on the relevant User Security table for each security group.
Cheers!
Nathan