Hi, thank you! That seems to work.
Mit freundlichen Grüßen / Best regards Sascha Retter Von: Gur Sannikov [mailto:[email protected]] Gesendet: Donnerstag, 27. November 2014 08:06 An: [email protected] Cc: Retter, Sascha Betreff: Re: Retrieve user in System Groovy Choice Parameter 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]<mailto:[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/6E554EC8B07C3344ACEABD98B2B9E86602938BE26A02%40HE113606.emea1.cds.t-internal.com. For more options, visit https://groups.google.com/d/optout.
