Make 'Anonymous Coward' configurable

Make the username that is displayed for users that haven't set a full
name configurable.

'Anonymous Coward' that was hard-coded in Gerrit before was seen by
some users as unprofessional and insulting. This is why for corporate
environments it makes sense to configure another name.

Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Change-Id: Ib2edee2af342b17df676e87cef99f92448895abe
This commit is contained in:
Edwin Kempin
2011-09-16 15:10:14 +02:00
parent 813123b520
commit 0e02deda52
29 changed files with 211 additions and 61 deletions

View File

@@ -16,6 +16,7 @@ package com.google.gerrit.server.mail;
import com.google.gerrit.reviewdb.Account;
import com.google.gerrit.reviewdb.Change;
import com.google.gerrit.server.config.AnonymousCowardName;
import com.google.gerrit.server.ssh.SshInfo;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
@@ -39,8 +40,10 @@ public class ReplacePatchSetSender extends ReplyToChangeSender {
private final SshInfo sshInfo;
@Inject
public ReplacePatchSetSender(EmailArguments ea, SshInfo si, @Assisted Change c) {
super(ea, c, "newpatchset");
public ReplacePatchSetSender(EmailArguments ea,
@AnonymousCowardName String anonymousCowardName, SshInfo si,
@Assisted Change c) {
super(ea, anonymousCowardName, c, "newpatchset");
sshInfo = si;
}