We have a tricky situation at our company and can't figure out a solution, maybe someone could help.
For support and investigation purposes, we need to give certain developers the permission to:
- execute Apex scripts in dev console
- run queries in dev console
- view record data in Salesforce Inspector
- to a diff check in Visual Studio Code from a sandbox against PROD
In order to allow them to run scripts in dev console, we have to give them the 'Author Apex' permission (which comes together with the 'Modify Metadata Through Metadata API Functions' one). However, if we do that, they are able to deploy to PROD directly, which, obviously, we don't want to do.
Is there a way to give someone all the above permissions, but stop them from deploying directly to PROD ?
We also looked into activating the following setting in Visual Studio Code: Detect Conflicts At Sync, which shows a confirmation popup whenever someone tries to deploy something new. However, this is not ideal because it runs for all environments. Maybe someone knows if it's possible to enable it only for PROD?
All advice is welcomed. Thank you!