notedb: Support users with no name or email

Change-Id: I238d362e23f9f18f37d508433484ce020bc9b99a
This commit is contained in:
Dave Borowitz
2014-08-04 13:56:02 -07:00
parent e643e7a5d8
commit 4da1602828
5 changed files with 60 additions and 13 deletions

View File

@@ -30,6 +30,7 @@ import com.google.gerrit.reviewdb.client.RevId;
import com.google.gerrit.server.GerritPersonIdent;
import com.google.gerrit.server.IdentifiedUser;
import com.google.gerrit.server.config.AllUsersName;
import com.google.gerrit.server.config.AnonymousCowardName;
import com.google.gerrit.server.git.GitRepositoryManager;
import com.google.gerrit.server.git.MetaDataUpdate;
import com.google.gerrit.server.project.ChangeControl;
@@ -75,6 +76,7 @@ public class ChangeDraftUpdate extends AbstractChangeUpdate {
@AssistedInject
private ChangeDraftUpdate(
@GerritPersonIdent PersonIdent serverIdent,
@AnonymousCowardName String anonymousCowardName,
GitRepositoryManager repoManager,
NotesMigration migration,
MetaDataUpdate.User updateFactory,
@@ -83,7 +85,8 @@ public class ChangeDraftUpdate extends AbstractChangeUpdate {
CommentsInNotesUtil commentsUtil,
@Assisted ChangeControl ctl,
@Assisted Date when) throws OrmException {
super(migration, repoManager, updateFactory, ctl, serverIdent, when);
super(migration, repoManager, updateFactory, ctl, serverIdent,
anonymousCowardName, when);
this.draftsProject = allUsers;
this.commentsUtil = commentsUtil;
checkState(ctl.getCurrentUser().isIdentifiedUser(),