Limit which users can execute methods in a particular top-level Apex class based on their profiles.
Required Editions
| Available in: Salesforce Classic (not available in all orgs) and Lightning Experience |
| Available in: Enterprise, Performance, Unlimited, Developer, and Database.com Editions |
| User Permissions Needed | |
|---|---|
| To set Apex class security: |
Manage Profiles and Permission Sets AND View Setup and Configuration |
- From Setup, enter Apex Classes in the Quick Find box, then select Apex Classes.
- Next to the name of the class that you want to restrict, click Security.
- Select the profiles that you want to enable from the Available Profiles list and click Add, or select the profiles that you want to disable from the Enabled Profiles list and click Remove.
- Click Save.