From d096de23a71a77288da45011b6e4259ef17544b4 Mon Sep 17 00:00:00 2001 From: Justin Harringa Date: Thu, 3 Oct 2013 12:42:00 -0500 Subject: [PATCH 1/2] Added ItemDiscover, ItemCancel, and ScmTag permissions to the enum These additional permissions should be useful for other standard permissions. --- .../groovy/javaposse/jobdsl/dsl/helpers/Permissions.groovy | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/Permissions.groovy b/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/Permissions.groovy index 1884c5bde..e65bfc17e 100644 --- a/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/Permissions.groovy +++ b/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/Permissions.groovy @@ -6,13 +6,16 @@ enum Permissions { ItemDelete('hudson.model.Item.Delete'), ItemBuild('hudson.model.Item.Build'), ItemRead('hudson.model.Item.Read'), + ItemDiscover('hudson.model.Item.Discover'), + ItemCancel('hudson.model.Item.Cancel'), ItemRelease('hudson.model.Item.Release'), ItemExtendedRead('hudson.model.Item.ExtendedRead'), RunDelete('hudson.model.Run.Delete'), - RunUpdate('hudson.model.Run.Update') + RunUpdate('hudson.model.Run.Update'), + ScmTag('hudson.scm.SCM.Tag') final String longForm Permissions(String longForm) { this.longForm = longForm } -} \ No newline at end of file +} From 79287bfbfa84936b2e3a1671066123a15c6772bb Mon Sep 17 00:00:00 2001 From: Justin Harringa Date: Thu, 3 Oct 2013 12:48:57 -0500 Subject: [PATCH 2/2] Reorder enums to reflect ordering in the Jenkins GUI This is more of a readability enhancement which could potentially be useful in the event that other permissions are added to Jenkins in the future. --- .../groovy/javaposse/jobdsl/dsl/helpers/Permissions.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/Permissions.groovy b/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/Permissions.groovy index e65bfc17e..05811aa87 100644 --- a/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/Permissions.groovy +++ b/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/Permissions.groovy @@ -1,12 +1,12 @@ package javaposse.jobdsl.dsl.helpers enum Permissions { - ItemConfigure('hudson.model.Item.Configure'), - ItemWorkspace('hudson.model.Item.Workspace'), ItemDelete('hudson.model.Item.Delete'), - ItemBuild('hudson.model.Item.Build'), + ItemConfigure('hudson.model.Item.Configure'), ItemRead('hudson.model.Item.Read'), ItemDiscover('hudson.model.Item.Discover'), + ItemBuild('hudson.model.Item.Build'), + ItemWorkspace('hudson.model.Item.Workspace'), ItemCancel('hudson.model.Item.Cancel'), ItemRelease('hudson.model.Item.Release'), ItemExtendedRead('hudson.model.Item.ExtendedRead'),