AccountService: Remove unused myAccount method
All UI screens now use the REST API to get the user account details. Change-Id: I336c597b2375686e30f162d2d148e8ba63920e3e
This commit is contained in:
@@ -17,7 +17,6 @@ package com.google.gerrit.common.data;
|
|||||||
import com.google.gerrit.common.audit.Audit;
|
import com.google.gerrit.common.audit.Audit;
|
||||||
import com.google.gerrit.common.auth.SignInRequired;
|
import com.google.gerrit.common.auth.SignInRequired;
|
||||||
import com.google.gerrit.extensions.client.DiffPreferencesInfo;
|
import com.google.gerrit.extensions.client.DiffPreferencesInfo;
|
||||||
import com.google.gerrit.reviewdb.client.Account;
|
|
||||||
import com.google.gerrit.reviewdb.client.AccountProjectWatch;
|
import com.google.gerrit.reviewdb.client.AccountProjectWatch;
|
||||||
import com.google.gwtjsonrpc.common.AsyncCallback;
|
import com.google.gwtjsonrpc.common.AsyncCallback;
|
||||||
import com.google.gwtjsonrpc.common.RemoteJsonService;
|
import com.google.gwtjsonrpc.common.RemoteJsonService;
|
||||||
@@ -30,9 +29,6 @@ import java.util.Set;
|
|||||||
|
|
||||||
@RpcImpl(version = Version.V2_0)
|
@RpcImpl(version = Version.V2_0)
|
||||||
public interface AccountService extends RemoteJsonService {
|
public interface AccountService extends RemoteJsonService {
|
||||||
@SignInRequired
|
|
||||||
void myAccount(AsyncCallback<Account> callback);
|
|
||||||
|
|
||||||
@Audit
|
@Audit
|
||||||
@SignInRequired
|
@SignInRequired
|
||||||
void changeDiffPreferences(DiffPreferencesInfo diffPref,
|
void changeDiffPreferences(DiffPreferencesInfo diffPref,
|
||||||
|
@@ -52,7 +52,6 @@ import java.util.Set;
|
|||||||
|
|
||||||
class AccountServiceImpl extends BaseServiceImplementation implements
|
class AccountServiceImpl extends BaseServiceImplementation implements
|
||||||
AccountService {
|
AccountService {
|
||||||
private final Provider<IdentifiedUser> currentUser;
|
|
||||||
private final ProjectControl.Factory projectControlFactory;
|
private final ProjectControl.Factory projectControlFactory;
|
||||||
private final AgreementInfoFactory.Factory agreementInfoFactory;
|
private final AgreementInfoFactory.Factory agreementInfoFactory;
|
||||||
private final Provider<ChangeQueryBuilder> queryBuilder;
|
private final Provider<ChangeQueryBuilder> queryBuilder;
|
||||||
@@ -66,23 +65,12 @@ class AccountServiceImpl extends BaseServiceImplementation implements
|
|||||||
final Provider<ChangeQueryBuilder> queryBuilder,
|
final Provider<ChangeQueryBuilder> queryBuilder,
|
||||||
SetDiffPreferences setDiff) {
|
SetDiffPreferences setDiff) {
|
||||||
super(schema, identifiedUser);
|
super(schema, identifiedUser);
|
||||||
this.currentUser = identifiedUser;
|
|
||||||
this.projectControlFactory = projectControlFactory;
|
this.projectControlFactory = projectControlFactory;
|
||||||
this.agreementInfoFactory = agreementInfoFactory;
|
this.agreementInfoFactory = agreementInfoFactory;
|
||||||
this.queryBuilder = queryBuilder;
|
this.queryBuilder = queryBuilder;
|
||||||
this.setDiff = setDiff;
|
this.setDiff = setDiff;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void myAccount(final AsyncCallback<Account> callback) {
|
|
||||||
run(callback, new Action<Account>() {
|
|
||||||
@Override
|
|
||||||
public Account run(ReviewDb db) throws OrmException {
|
|
||||||
return db.accounts().get(currentUser.get().getAccountId());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void changeDiffPreferences(final DiffPreferencesInfo diffPref,
|
public void changeDiffPreferences(final DiffPreferencesInfo diffPref,
|
||||||
AsyncCallback<VoidResult> callback) {
|
AsyncCallback<VoidResult> callback) {
|
||||||
|
Reference in New Issue
Block a user