check.access: allow specifying permissions

This allows us to verify permissions of a specific user without having
to read through project configurations.

Change-Id: Ibfe988391578dcadd74014ade181e7c15a484016
This commit is contained in:
Han-Wen Nienhuys
2018-01-18 19:27:46 +01:00
parent 033b6b1e51
commit 8a4a682aa1
4 changed files with 143 additions and 28 deletions

View File

@@ -18,13 +18,8 @@ import com.google.gerrit.common.Nullable;
public class AccessCheckInput {
public String account;
@Nullable public String ref;
public AccessCheckInput(String account, @Nullable String ref) {
this.account = account;
this.ref = ref;
}
public AccessCheckInput() {}
// If permission is given, ref must also be given.
@Nullable public String permission;
}