Ravindra BagaleCourses & study guides

26. Row-Level Security (RLS)

26.2 Static RLS

In static RLS, the filter value is fixed inside the role.

  1. Modeling › Manage roles.
  2. Click New and name the role, e.g. Pune.
  3. Select the table DarkStore and 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

A common static RLS mistake is 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. Don't make this mistake!