Unable to automate configuration of permissions

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      I'm trying to automate the configuration of the `Enable permissions` EnvInject plugin setting.

       

      I've tried using the Groovy code below: 

       

      import org.jenkinsci.plugins.envinject.EnvInjectPluginConfiguration
      EnvInjectPluginConfiguration config = GlobalConfiguration.all().get(EnvInjectPluginConfiguration.class) 
      config.setEnablePermissions(true) 
      config.save()
      

       

      And the following configuration as code configuration:

       

      security: 
         envinject: 
            hideInjectedVars: false
            enablePermissions: true 
            # Bad idea, see the security advisories 
            enableLoadingFromMaster: false
      

      Both of which tick the `Enable permissions` checkbox on the `Configure Global Security` page.

       

      However when I then go to manage roles I see the column title `Env. Inject` but no check boxes.

        

       

      I've also tried using the configuration as code plugin to enable this permission but that doesn't seem to fix the issue either.

       

      This has left me having to disable anyone from seeing environment variables to stop sensitive environment variables from being visible to anyone. Ideally I'd allow certain groups to see these to aid debugging.

       

            Assignee:
            Unassigned
            Reporter:
            Adam Dougal
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: