Author Topic: python api and user  (Read 3774 times)

ashok

  • Full Member
  • ***
  • Posts: 11
python api and user
« on: January 28, 2013, 10:53:49 PM »
We're having an issue with some of our tools where qube is showing usernames with mixed upper and lower case letters. In debugging this, I noticed that if your provide an empty string to the qube api or don't set the user, qube gui will somehow magically put the job under your username.  Where is qube grabbing this information from?

Thanks!

jburk

  • Administrator
  • *****
  • Posts: 493
Re: python api and user
« Reply #1 on: January 28, 2013, 11:09:43 PM »
On windows, it's from the logged-in user's credentials (essentially the user's name, but not from the USERNAME environment variable), and for OS X and linux, it's from the username associated with your uid.

ashok

  • Full Member
  • ***
  • Posts: 11
Re: python api and user
« Reply #2 on: January 28, 2013, 11:21:11 PM »
Thanks! We're on a Windows network so this helps a lot. I've tracked down the other issues we were having related to this so we should be able to solve it. We were originally using os.getenv('USERNAME') to explicitly declare the user, but what is the preferred way to do this since this isn't actually correct?

Thanks again!

ashok

  • Full Member
  • ***
  • Posts: 11
Re: python api and user
« Reply #3 on: January 29, 2013, 12:35:07 AM »
Got this all worked out. Thanks!