Ignore account visibility when processing reviewers

The reviewers plugin allows project owners to configure a list
of accounts and groups that should be added as reviewers. The logic
that actually adds reviewers is triggered e.g. on change updates.

We used to check account visibility against the calling user (the user
who updated the change) which conceptually makes no sense because
the project owner provided this list. Next to the conceptual mistake
that we get a good number of bug reports for, checking account
visibility here is also very slow. We saw traces where it took
10s of seconds.

This commit makes checking account visibility dependent on what we do:
  - For suggesting reviewers, we keep the visibility check
  - For processing updates, we drop it

Google-Bug-Id: b/267202984
Change-Id: I39023f74e7cfbdab24b7abd3df6518e0b2a4b209
5 files changed