import hudson.security.*
def job = Hudson.instance.items.find{job -> job.name == "MyJob"}
def authorizationMatrixProperty = job.getProperty(AuthorizationMatrixProperty.class)
authorizationMatrixProperty?.add(hudson.model.Item.CANCEL,"TESTUSER")
authorizationMatrixProperty?.add(hudson.model.Item.RELEASE,"TESTUSER")
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/4f03307f-0a28-4af2-8b5a-9af572d80300%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
import hudson.security.*import org.jvnet.hudson.plugins.m2release.*
def job = Hudson.instance.items.find{job -> job.name == "MyJob"}def authorizationMatrixProperty = job.getProperty(AuthorizationMatrixProperty.class)
authorizationMatrixProperty?.add(M2ReleaseBuildWrapper.DescriptorImpl.CREATE_RELEASE,"TESTUSER")