InfoSec812 / sonar-auth-google

OAuth2 Authentication Plugin For SonarQube
Apache License 2.0
27 stars 25 forks source link

Disable the resetting of the user's name at each login #12

Open ghost opened 6 years ago

ghost commented 6 years ago

I have recently set up a SonarQube 6.7 LTS server for the team that I manage and we are logging in using this plugin. It works fine.

I have however noticed that the name of the user as shown in SonarQube is reset to the user's login (which is an e-mail address) every time they log in, no matter if they have changed it.

Log in once, the name is set to the e-mail address. Change the name to the user's real name. Log out. Log in again. The name is set to the e-mail address.

Is it possible to disable that resetting?

The current configuration is:

Please, let me know if more information is needed.

InfoSec812 commented 6 years ago

So, in the code HERE you can see that the "Display Name" is being set from the Google account. I'm not sure how I would allow the manually set Display Name to be "merged" or overridden on each login. I will try to take a look.

ghost commented 6 years ago

Alright! I saw that indeed. But there's a second setName two lines below the one you referenced. Maybe that's the culprit? I'll check with our Google Admins and see whether the display names of accounts from our domain are empty or not. Thank you.