commit | 9e8d456218cd584273fc4627088006c743e7172e | [log] [tgz] |
---|---|---|
author | Edwin Kempin <ekempin@google.com> | Fri Mar 19 11:54:55 2021 +0100 |
committer | Edwin Kempin <ekempin@google.com> | Fri Mar 19 11:59:35 2021 +0100 |
tree | 63eb7c7f478566ca28efd44b56749df56252015e | |
parent | 2b609d51805f0b249b74b697cdd90fbd0a8ee027 [diff] |
Fix resolving exempted users to accounts in background threads The code-owners submit rule can be executed in background threads where a current user is not available (e.g. when a change is indexed). AccountResolver needs the current user to check the account visibility and fails if it is not available. Hence we must not use AccountResolver to resolve exempted users. Using AccountResolver for this was also a mistake due to other reasons: * it checks account visibility, which we don't want to do * it may access the account index, which we also don't want to do * it searched over all account fields, but we are only interested in emails (the code handled this case, but it adds unnecessary complexity) Fix all of this by using the Emails class, instead of AccountResolver, to resolve exempted users. Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: I238d343a7c9b1a64b789f4f671707bb0227e52b8
This plugin provides support for defining code owners for files in a repository.
If the code-owners plugin is enabled, changes can only be submitted if all touched files are covered by approvals from code owners.
Also see resources/Documentation/about.md.
IMPORTANT: Before installing/enabling the plugin follow the instructions from the setup guide, see resources/Documentation/setup-guide.md.