Modify and remove users from jobs using project-based security

15 views
Skip to first unread message

Ed Mangual

unread,
Oct 12, 2017, 4:48:53 PM10/12/17
to Jenkins Users
Hello everyone.

I am trying to find or write a groovy script (not very good at it btw) that I can use to modify the permissions of an existing user (e.g Build, Cancel,Discover,Read) in a Job configured with project-based security. I also want to be able to remove a user completely from the job. I have searched google, but unable to find a good example that suits my needs. 

The Cloudbees folder plugin is being used  to organize jobs based on the products we support.

I would appreciate if anyone could provide some help.

Thanks in advance,

Ed

Victor Martinez

unread,
Nov 23, 2017, 2:03:27 PM11/23/17
to Jenkins Users
Likely you can use something like what it is explained below:

I'd also if you use jobdsl you could avoid that groovy scripting and have the entire job configuration in source code, just as tip.

Cheers
Reply all
Reply to author
Forward
0 new messages