Allow Realm to participate when linking an account identity

When linking a new user identity to an exisiting account, permit the
Realm to observe the new incoming identity and the current account,
and to alter the request. This enables a Realm to observe when a
user verifies a new email address link.

Change-Id: I152d3e4a6713a5d6c757839c857eaf2752b32675
This commit is contained in:
Shawn O. Pearce
2012-01-17 09:53:54 -08:00
parent 30e74bbc8d
commit d3a1bbbf38
4 changed files with 18 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ package com.google.gerrit.server.account;
import com.google.gerrit.reviewdb.Account;
import com.google.gerrit.reviewdb.AccountGroup;
import com.google.gerrit.reviewdb.ReviewDb;
import java.util.Set;
@@ -25,6 +26,9 @@ public interface Realm {
public AuthRequest authenticate(AuthRequest who) throws AccountException;
public AuthRequest link(ReviewDb db, Account.Id to, AuthRequest who)
throws AccountException;
public void onCreateAccount(AuthRequest who, Account account);
public Set<AccountGroup.UUID> groups(AccountState who);