AccountManager: Create account and username atomically
So far the account was created first and then in a second transaction the external ID for the username was added. This meant that the account creation needed to be rolled back if the creation of the external ID for the username failed. With this change the account and the external ID for the username are now created within the same transaction. ChangeUserName is now only used by PutUsername and hence it is merged into this class. Change-Id: I8f06f792b02331d10b943a52c6c890830087caec Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -86,7 +86,6 @@ import com.google.gerrit.server.account.AccountManager;
|
||||
import com.google.gerrit.server.account.AccountResolver;
|
||||
import com.google.gerrit.server.account.AccountVisibilityProvider;
|
||||
import com.google.gerrit.server.account.CapabilityCollection;
|
||||
import com.google.gerrit.server.account.ChangeUserName;
|
||||
import com.google.gerrit.server.account.EmailExpander;
|
||||
import com.google.gerrit.server.account.GroupCacheImpl;
|
||||
import com.google.gerrit.server.account.GroupControl;
|
||||
@@ -419,7 +418,6 @@ public class GerritGlobalModule extends FactoryModule {
|
||||
factory(VersionedAuthorizedKeys.Factory.class);
|
||||
|
||||
bind(AccountManager.class);
|
||||
factory(ChangeUserName.Factory.class);
|
||||
|
||||
bind(new TypeLiteral<List<CommentLinkInfo>>() {})
|
||||
.toProvider(CommentLinkProvider.class)
|
||||
|
Reference in New Issue
Block a user