Set Apex Class Access from the Class List Page
- 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.