Issue Type: Improvement Improvement
Assignee: Daniel Spilker
Components: job-dsl-plugin
Created: 10/Mar/15 6:54 PM
Description:

In order to set `blocksInheritance` in the authorization closure we need to use the configure block

job.groovy
freeStyleJob('maintenance/jenkins-seed') {
    displayName('Jenkins Jobs Seed')

    concurrentBuild(allowConcurrentBuild = true)

    configure {
        job_properties = it.get('properties').get(0)
        auth_matrix = job_properties.appendNode('hudson.security.AuthorizationMatrixProperty')
        auth_matrix.appendNode('blocksInheritance').setValue(true)
    }
}

Would be nice to have something like:

job.groovy
freeStyleJob('maintenance/jenkins-seed') {
    displayName('Jenkins Jobs Seed')

    concurrentBuild(allowConcurrentBuild = true)

    authorization {
        blocksInheritance(true)
    }
}
Project: Jenkins
Priority: Minor Minor
Reporter: Pedro Algarvio
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to