I would like to change my name in Gerrit from "Dzahn" to "Daniel Zahn" and just use First Last like others in the team do.
But only if i can also change the entire history, i think i'd rather not if it means older commits are under a different name.
Am i on my own or would anyone help who did it before ? Who did?
--------------
@hashar wrote:
**TL;DR: have your wikitech account renamed to "Daniel Zahn" to update your LDAP `cn` which is used as the displayed name in Gerrit.**
-----
+ @laner who wrote the LdapAuthentication extension, created labs and installed Gerrit
+ @faidon with whom I talked about it (iirc)
+ @demon who is cursed as Gerrit maintainer
Blame LDAP and our original Gerrit configuration. I proposed a patch to change the field Gerrit uses from LDAP for the account in April 2012 at https://gerrit.wikimedia.org/r/#/c/4166/ where I proposed to use the unique identifier to authenticate instead of the `cn` which is the wiki account:
```
lang=diff
-accountPattern = (&(objectClass=person)(cn=${username}))
+accountPattern = (&(objectClass=person)(uid=${username}))
accountFullName = cn # used by Gerrit for display purposes
```
```
This way someone with:
uid: brion
cn: Brion Vibber
Will be able to log in gerrit using 'brion' and will have for realname
'Brion Vibber' whenever a merge is done on his behalf by Gerrit.
```
`cn` comes from the wikitech login. The proposed change was rejected since people would have to login in Gerrit with their shell account and most users would want different things as shell and wiki account.
For display purposes, Gerrit uses `cn`:
[ldap]
accountFullName = cn
So, for now, the only way is to change your labs account on Wikitech from `Dzahn` to `Daniel Zahn` and use the later to login on wikitech (and other ldap backed sites). That will change the `cn` and update your full name.
Your LDAP account has:
```
uid: dzahn # shell account
cn: Dzahn # shown in Gerrit as full name
```
Mine:
```
uid: hashar # shell account
cn: Hashar # shown in Gerrit as full name week
```
So the root cause is we lack something to express the common name in MediaWiki. The wiki signature contains wiki which is not ideal. Lot of people use their common name as a wikitech login (and then it is displayed in Gerrit).
Currently we have:
| Field | Example 1 | Example 2 | Example 3
|--|--|--|--
| common name (`cn`) && wiki account | DZahn | Hashar | Brion VIBBER
| shell (`uid`) | dzahn | hashar | brion
We would need a third field and end up in a situation where we can disambiguate the common name and wiki account:
| Field | Example 1 | volunteer | contractor | Example 3
|--|--|--|--|--
| wiki account | Dzahn | Hashar | Amusso (WMF) | Brion VIBBER
| shell (`uid`)| dzahn | hashar | amusso | brion
| common name (`cn`) | Daniel Zahn | Antoine Musso | Antoine Musso | Brion Vibber