gerrit/gerrit-httpd
Dave Borowitz 0669078106 ChangeQueryBuilder: Always get user lazily from Arguments
There were a few special predicates that depended on constructing new
ChangeQueryBuilders with the same arguments but a different user. This
created the error-prone situation of the code in these predicates
having two different users available (from the args and passed in
explicitly), where only one of them was the right user to be using.
Teach these predicates to get the user they need directly from the
Arguments, and change callers to construct new Arguments containing
the appropriate user.

Also add some new methods to Arguments to extract a CurrentUser and/or
IdentifiedUser, throwing QueryParseException with a useful message if
the user is not logged in. This allows queries that do not depend on
the current user to succeed as in contexts without a user, e.g.
searching for submitted changes in a background thread.

Change-Id: Ic6479455b0978306ccd3239b0cc35c7253f04854
2015-01-05 11:18:45 -08:00
..
src ChangeQueryBuilder: Always get user lazily from Arguments 2015-01-05 11:18:45 -08:00
BUCK Refactor RequestUtil into a separate package 2014-10-30 15:35:26 -07:00