Forum Discussion
khalilg
4 years agoRegular Visitor
Dynamic RLS with complex security module
Hi, I'm trying to create a Dynamic RLS for a complex security module, here are the table structure and relationship: Table 1. Users Username Company Code Role Type Access ID A A S ...
lbendlin
4 years agoSuper User
khalilg Why do you have AccessID as part of the Users table?
It feels as if you need to have a concatenated list of Access Details in the Users table, and make them company specific to remove the dependency on Company Code.
| Username | Company Code | Role Type | Access Codes |
| A | A | S | 12345|67891 |
| B | A | A | |
| C | A | R | 77 |
| D | B | B | 97 |
And then in the RLS rules you can check PATHCONTAINS()