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

@@ -21,6 +21,7 @@ import com.google.gerrit.reviewdb.AccountProjectWatch;
import com.google.gerrit.reviewdb.Change;
import com.google.gerrit.reviewdb.AccountProjectWatch.NotifyType;
import com.google.gerrit.server.account.GroupCache;
import com.google.gerrit.server.config.AnonymousCowardName;
import com.google.gerrit.server.ssh.SshInfo;
import com.google.gwtorm.client.OrmException;
import com.google.inject.Inject;
@@ -38,9 +39,10 @@ public class CreateChangeSender extends NewChangeSender {
private final GroupCache groupCache;
@Inject
public CreateChangeSender(EmailArguments ea, SshInfo sshInfo,
public CreateChangeSender(EmailArguments ea,
@AnonymousCowardName String anonymousCowardName, SshInfo sshInfo,
GroupCache groupCache, @Assisted Change c) {
super(ea, sshInfo, c);
super(ea, anonymousCowardName, sshInfo, c);
this.groupCache = groupCache;
}