77a3ac909e
By default account queries only returned active accounts since AccountIndexRewriter added "is:active" to the query if the query didn't have a predicate for the ACTIVE field yet. This default makes sense for user queries, but for Gerrit internal queries we rather want to find all matching accounts (active and inactive accounts). E.g. AccountCacheImpl#ByNameLoader uses the InternalAccountQuery to find accounts by username and assumes that also inactive accounts would be included in the result. To fix this the logic for adding "is:active" to the query is removed from AccountIndexRewriter. Instead users of AccountQueryProcessor must now add the "is:active" predicate to the query if it is desired. We do this for the QueryAccounts REST endpoint, for the reviewer suggestion and for the account suggestion in the singleusergroup plugin. This way the behaviour in the UI and in REST API users stays the same. Only the behaviour for internal account queries is changed. An alternative fix has been implemented as change I2402da18f7 but review discussions on that change showed that the solution that is implemented in this change is preferred. Change-Id: I795925f14435088885bb22ab7183e4058bb802fd Signed-off-by: Edwin Kempin <ekempin@google.com> |
||
---|---|---|
.. | ||
src/test | ||
BUILD | ||
tests.bzl |