26.2 Static RLS
In static RLS, the filter value is fixed inside the role.
- Modeling › Manage roles.
- Click New and name the role, e.g.
Pune. - Select the table
DarkStoreand add a rule: City equals Pune. You can also switch to the DAX editor and type:
[City] = "Pune"
Then repeat steps 2–3 for Nashik, Nagpur, Kolhapur, Solapur and Sambhaji Nagar, and click Save.
A platform-based static role works the same way – for example a role Amazon Now Team with the rule [Platform] = "Amazon Now" on the DarkStore table.
Limitation: you need one role per value. With many cities or hundreds of store managers, static roles become hard to maintain. That is when dynamic RLS helps.
Ravindra Bagale's Tip
Static RLS madhli ek common chuk mhanje creating one role per city and then forgetting to add new users to the right role in the Service, so they see nothing. Document which role each group gets, and assign security groups rather than individual users. Chuk karu naka!