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

New Job-DSL syntax does not create permission entries

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Critical Critical
    • matrix-auth-plugin
    • None
    • Jenkins 2.414.3, Debian 12, all plugins at current versions, users/groups from AD

      While the new syntax works fine in JCasC for creating global permissions, it doesn't work at all in Job-DSL for creating project permissions. The following script creates a job containing only the two empty default permission rows ("Anonymous", "Authenticated Users") instead of the provided permission entries: 

      freeStyleJob('PermissionTest') {
        properties {
          authorizationMatrix {
            inheritanceStrategy {
              nonInheriting()
            }
            entries {
              group {
                name('authenticated')
                permissions([
                  'Overall/Read'
                ])
              }
              group {
                name('adgroup')
                permissions([
                  'Overall/Administer'
                ])
              }
              user {
                name('aduser')
                permissions([
                  'Overall/Read'
                ])
              }
            }
          }
        }
      }

            danielbeck Daniel Beck
            dhs Dirk Heinrichs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: