Modify and remove users from jobs using project-based security
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.