Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-72025

authorizationMatrix - can't create permissions in DSL after upgrade to 3.2

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • matrix-auth-plugin
    • None

      I have DSL script like this:

      functions.groovy

       

      ...
          static void setJobAuthorization(def job) {
              job.with {
                  properties {
                      authorizationMatrix {
                          inheritanceStrategy {
                              nonInheriting()
                          }
                          entries {
                              group {
                                  name('authenticated')
                                  permissions([
                                      'Job/Read'
                                  ])
                              }
                          }
                      }
                  }
              }
          }
      ...

       

       

      jobs.groovy

       

      ...
      jobname = pipelineJob("build-pipeline")
      setJobAuthorization(jobname) 

      and got the following error:

      ERROR: (functions.groovy, line 51) No signature of method: java.util.LinkedHashMap.call() is applicable for argument types: (java.util.ArrayList) values: [[Job/Read]]
      Possible solutions: wait(), any(), wait(long), each(groovy.lang.Closure), max(groovy.lang.Closure), take(int)
      Finished: FAILURE 

      Before version 3.2 everything worked fine

      Please help

       

            danielbeck Daniel Beck
            sabretus Lev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: