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
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!
Ravindra Bagale's Tip – मराठी
Static RLS मधली एक common चूक म्हणजे प्रत्येक city साठी एक role बनवणं आणि मग Service मध्ये नवीन users ना योग्य role मध्ये जोडायला विसरणं, त्यामुळे त्यांना काहीच दिसत नाही. कोणत्या group ला कोणता role मिळतो ते लिहून ठेवा, आणि एक-एक user ऐवजी security groups assign करा. ही चूक करू नका!
Ravindra Bagale's Tip – हिंदी
Static RLS की एक common गलती है हर city के लिए एक role बनाना और फिर Service में नए users को सही role में जोड़ना भूल जाना, जिससे उन्हें कुछ नहीं दिखता. लिखकर रखो कि किस group को कौन सा role मिलता है, और अलग-अलग users की जगह security groups assign करो. यह गलती मत करना!