[JIRA] [core] (JENKINS-14605) Simple means to obtain logged in user's id

6 views
Skip to first unread message

bharatgoe@gmail.com (JIRA)

unread,
Sep 18, 2015, 4:53:04 AM9/18/15
to jenkinsc...@googlegroups.com
bharat goel commented on Improvement JENKINS-14605
 
Re: Simple means to obtain logged in user's id

Hi Stanislav

I have a similar problem which i am trying to solve to capture log in user name. Please suggest were you able to get this info?

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

stanislav.bashkirtsev@gmail.com (JIRA)

unread,
Sep 18, 2015, 5:11:01 AM9/18/15
to jenkinsc...@googlegroups.com

Was too long ago, don't even remember the fact that I asked this question, sorry

pauloneves@gmail.com (JIRA)

unread,
Dec 18, 2018, 1:40:02 PM12/18/18
to jenkinsc...@googlegroups.com
Paulo Eduardo Neves reopened an issue
 

The problem persists. The two commands below return SYSTEM when they are run inside a pipeline script.

 

User.current()Jenkins.getAuthentication().getName()

 

Currently there is no way get the logged in user from a pipeline.

Jenkins / Improvement JENKINS-14605
Change By: Paulo Eduardo Neves
Resolution: Not A Defect
Status: Resolved Reopened
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

jglick@cloudbees.com (JIRA)

unread,
Jan 11, 2019, 5:46:02 PM1/11/19
to jenkinsc...@googlegroups.com
Jesse Glick resolved as Not A Defect
 

Remember that these methods are generally only meaningful within the dynamic scope of an HTTP request or CLI command. Use the dev mailing list or IRC if you still have issues.

Change By: Jesse Glick
Status: Open Resolved
Resolution: Not A Defect

jglick@cloudbees.com (JIRA)

unread,
Jan 11, 2019, 5:46:02 PM1/11/19
to jenkinsc...@googlegroups.com

benjamin.muschko@gmail.com (JIRA)

unread,
Oct 2, 2019, 11:49:03 AM10/2/19
to jenkinsc...@googlegroups.com
Benjamin Muschko commented on Improvement JENKINS-14605
 
Re: Simple means to obtain logged in user's id

This is still an issue and I don't quite understand why this JIRA ticket has been closed.

Could you please clarify how to retrieve the currently logged-in user from a shared library? Is this currently possible or not? Everything I tried so far returns SYSTEM as mentioned above. The behavior is different from the use of those API calls from the Groovy console (which works as expected).

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

jglick@cloudbees.com (JIRA)

unread,
Oct 2, 2019, 3:19:04 PM10/2/19
to jenkinsc...@googlegroups.com

Reread the prior comments. There is no such thing as “the currently logged-in user from a shared library”.

benjamin.muschko@gmail.com (JIRA)

unread,
Oct 2, 2019, 4:10:02 PM10/2/19
to jenkinsc...@googlegroups.com

Jesse Glick Thanks for confirming. Just for my and other people's understanding, could you also provide some technical details on why this functionality is not available?

jglick@cloudbees.com (JIRA)

unread,
Oct 2, 2019, 4:15:03 PM10/2/19
to jenkinsc...@googlegroups.com

A build is not generally run with any association with a user whatsoever. The question just does not make sense. If a build happened to be triggered manually by a user (which is not the normal case), that information is already available via UserIdCause.

Reply all
Reply to author
Forward
0 new messages