Sub topic 5
System and user permissions
This chapter assumes you know how profiles hold object permissions and field-level security. It also assumes you can find a profile or permission set in Setup.
What they are
Object permissions and field-level security control access to data. System and user permissions control what a user can do in the org. They are not tied to one object. Each one is a checkbox that is either on or off.
Examples:
| Permission | What it allows |
|---|---|
| API Enabled | Access to the org through the API, including integrations and tools |
| Run Reports | Running reports |
| Export Reports | Exporting report results |
| Manage Users | Creating and editing users |
| View Setup and Configuration | Viewing Setup pages |
| View All Data | Reading every record of every object |
| Modify All Data | Creating, editing and deleting every record of every object |
Salesforce lists these under System Permissions in Setup. The Metadata API stores them all as userPermissions.
Where you set them
Both profiles and permission sets can hold these permissions. A user's effective access is the union of everything granted. If the profile leaves a permission off and one assigned permission set turns it on, the user has it. A permission set can add a permission but cannot take one away. Removal happens by editing the profile, removing the assignment, or muting inside a permission set group. Muting is covered in a later chapter.
What it looks like as metadata
This fragment grants API Enabled in a permission set. A profile uses the same element.
<?xml version="1.0" encoding="UTF-8"?>
<PermissionSet xmlns="http://soap.sforce.com/2006/04/metadata">
<label>API Access</label>
<hasActivationRequired>false</hasActivationRequired>
<userPermissions>
<enabled>true</enabled>
<name>ApiEnabled</name>
</userPermissions>
</PermissionSet>Common errors
- Treating View All Data and Modify All Data as minor settings. They override object permissions and record sharing across every object. Give them only to administrators and tightly controlled integration users.
- Mixing up Modify All Data and Modify All on an object. The system permission covers all objects. The object permission covers one object.
- Forgetting dependencies. Some permissions require others. Setup usually enables the prerequisite or blocks the change. A deployment of a permission set that omits a required permission can fail.
- Putting everything on the profile. Broad system permissions on a shared profile reach everyone who uses it. Grant them through a permission set for the job function that needs them.
- Assuming a permission is missing when it isn't licensed. Some permissions only appear if the user's license or an assigned permission set license supports them.
Exercise
A user's profile has Run Reports on and Export Reports off. You assign a permission set that has Export Reports on. Can the user export reports? What if you later need to stop this without touching the profile?
Show answer
Yes. System permissions combine as a union, so the permission set's Export Reports adds to the profile. To stop it, remove the permission set assignment or turn off Export Reports in that permission set. A permission set cannot take away a permission the profile grants. Inside a permission set group, a muting permission set can remove it.