Exclude specifed files from plugin editor

Those constants are set in wp-config.php like

define( 'DISALLOW_FILE_EDIT', true );
define( 'DISALLOW_FILE_MODS', true );

The first line disables file editing in the wp backend, whereas the second line disables plugin installation or deletion entirely.

If you want to disable editing of files from the backend only partly, you’d have to do it another way.