Is there a way to disable/enable plugin per job or slave node?
I’m looking for a way to do that because jenkins admin in my company has concerns about security issues come with groovy system plugin and wants to disable the plugin for all jobs but mine.
To answer the original question, the way to hide something is to create a class which extends hudson.model.DescriptorVisibilityFilter, and overrides filter() method, which can then perform arbitrary hiding. I’m pretty sure it will also work on build steps. I don’t know of an existing plugin which would do this in a configurable way, so it’s probably time to learn some Jenkins plugin coding, if you want this.
But, with system groovy build step this is not very useful, as explained by Vladimir above.