Remove Common.getAccountId and use Guice injection only

The server side code can use the Provider<CurrentUser> to obtain
the current user identity when it needs one.  The client side
only needs it in one place, Link, to compute the identity for
the "#mine" display.  This is easily obtained from the already
existing static account reference.  We might want to look at
using gwt-guice for the client side in the future, but that is
out of scope for now.

Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2009-08-05 16:24:41 -07:00
parent 82d93f7f4a
commit 65d2cd8784
21 changed files with 122 additions and 171 deletions

View File

@@ -15,7 +15,7 @@
package com.google.gerrit.server.workflow;
import com.google.gerrit.client.data.ApprovalType;
import com.google.gerrit.client.reviewdb.Account;
import com.google.gerrit.server.CurrentUser;
/** A function that does nothing. */
public class NoOpFunction extends CategoryFunction {
@@ -26,7 +26,7 @@ public class NoOpFunction extends CategoryFunction {
}
@Override
public boolean isValid(final Account.Id accountId, final ApprovalType at,
public boolean isValid(final CurrentUser user, final ApprovalType at,
final FunctionState state) {
return false;
}