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'),
    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'),
    ScmTag('hudson.scm.SCM.Tag')

    final String longForm
    Permissions(String longForm) {
        this.longForm = longForm
    }
}

package javaposse.jobdsl.dsl.helpers

enum Permissions {
    ItemDelete('hudson.model.Item.Delete'),
    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'),
    RunDelete('hudson.model.Run.Delete'),
    RunUpdate('hudson.model.Run.Update'),
    ScmTag('hudson.scm.SCM.Tag')

    final String longForm
    Permissions(String longForm) {
        this.longForm = longForm
    }
}

Reorder enums to reflect ordering in the Jenkins GUI
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.
