Salesforce - Security 101
Salesforce, like many other enterprise-class systems, employs various levels of controls to manage access. In this issue, we will closely examine the basics.
Profiles, Permission Sets, and Roles
In Salesforce, all users must be assigned a profile during user creation, and this profile defines basic access for that user. Typically, profiles are used to assign basic access and then multiple permission sets may be used to grant additional access without manipulating profiles. If a user needs access to an object or a field that is not covered by a profile, permission sets can be used to extend their access. Permission sets can also be used to temporarily grant access to entities.
In addition to objects and fields, users would also need access to records, and that is where roles are used. While profiles and permission sets govern object and field-level security, roles govern record-level security; (i.e. what set of rules should decide whether a user can access a record).
Role Hierarchies and Organization-wide Defaults
Role hierarchies are commonly used in the setup of roles, and as the name suggests they represent a hierarchy, similar to an org chart. Users assigned to roles near the top of the hierarchy get access to data that is accessible by users who fall directly below them in the hierarchy. Keep in mind that role hierarchies don’t need to exactly match your org chart.
Salesforce recommends setting the default access levels to be fairly restricted, and then provides the above features to open up access as needed. These default settings are referred to as organization-wide defaults or org-wide defaults.