What’s the point of restriction rules?
Salesforce professionals need to understand the difference between the least privilege sharing model and restriction rules when controlling record access. This guidance clarifies that because users with View All permissions bypass restriction rules, the safer and more reliable method is to set object sharing to Private and then grant access selectively using sharing rules. Knowing this prevents unintended access due to super users having broad permissions. In practice, teams should default to the least privilege model unless their design explicitly accommodates restriction rules.
- Use the least privilege model by setting objects to Private and then sharing selectively.
- Restriction rules remove access but don’t affect users with View All permissions.
- Senior users often have View All access, which bypasses restriction rules.
- Default to least privilege sharing unless there is a specific design need for restriction rules.
In Salesforce, you have two approaches to give user access to certain records. Use the least privilege model. This means settings the object to Private and then creating a Sharing Rule to provide access to specific users or groups Use restriction rules to remove access to certain records for specific users or groups When deciding which approach to use, consider this: users with the View All Records or View All Data permissions can view all records regardless of restriction rules. Keep in mind that it9s quite possible that senior staff or super users often have this View Allon Opportunities to run reports. Given this huge exception, the first approach is the right approach every time. The takeaway Unless you have a very specific design that accounts for restriction rules, choose the least privilege model.