Fix SSH based CurrentUser to know what the database is
When we ask for the CurrentUser or IdentifiedUser in an SSH request we
kept pulling back some oddity off the SshSession that didn't have a
request scoped Provider<ReviewDb>. This meant that we couldn't get
access to database backed entities like the starred changes of the
user.
Recreate the identity object on the fly when its first asked for
within the command request scope. This way the Provider<ReviewDb> can
be bound and used as expected.
Change-Id: I141e9bf20a52596cfbbf859aa14403ceba164e73
Signed-off-by: Shawn O. Pearce <sop@google.com>
2 files changed