Determine groups of user inside System

8 views
Skip to first unread message

Sascha...@t-systems.com

unread,
Jan 27, 2015, 3:49:13 AM1/27/15
to jenkins...@googlegroups.com
Hi,
 
we are facing the problem, that a “System Groovy Choice Parameter” behaves different depending on the user who starts the build.
 
We've created a job to easily create branch-jobs for users but the job only works for administrators because we need to access the groups the user who started the job is member of. All the API-Methods we have tried return an empty list for "normal" users. For administrators it works without any problem.
 
To conclude is there any option to access the list of groups a (normal) user who has started a build is member of in a “System Groovy Script”? We are retrieving the userId by using: (0).collect{hudson.model.User.current().getId()}[0];
 
Thanks,

Sascha
 
Reply all
Reply to author
Forward
0 new messages