-
Bug
-
Resolution: Fixed
-
Minor
-
None
When iterating over a collection with .each, the permission method seems to call the deprecated job permission method with logs a warning (Warning: permission is deprecated)
def builderNames = ['john', 'jill', 'bob'] freeStyleJob('jobName') { // .... authorization { builderNames.each { permission(Permissions.ItemBuild, it) } } // .... }
However, something like this works and does not log the warning:
def builderNames = ['john', 'jill', 'bob'] freeStyleJob('jobName') { // .... authorization { for (builderName in builderNames) { permission(Permissions.ItemBuild, builderName) } } // .... }
This seems to be related to https://issues.jenkins-ci.org/browse/JENKINS-27321 but I've updated the description of this issue to specify that it only seems to be happening in .each (though I haven't tried other methods that take Closures as arguments)
- is duplicated by
-
JENKINS-27321 Permission deprecation warning
- Closed