Hi, I have a solution for you.
Please try,
return (0).collect{hudson.model.User.current().getDisplayName()};
On Friday, October 24, 2014 10:09:05 AM UTC+3, [email protected]
wrote:
>
> Hello Everybody,
>
> we need to identify the currently logged-in user in an “Extensible Choice
> Parameter” with Choice Provider “System Groovy Choice Parameter”. We tried
> the following:
>
>
> - User.current()
> - Jenkins.getAuthentication()
> - Build.getCause … which works in a build step but not in an
> Extensible Choice Parameter
>
>
> We need the user or more exactly the groups the user is member of to
> calculate what is displayed in the Choice Parameter dropdown. Is there a
> way to retrieve the user?
>
> Thanks & best regards,
>
> Sascha Retter
>
>
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/6484ab27-fc11-4d75-bf5b-88e09d182092%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.