Add REST API endpoints for user's contribution agreements

Add two new REST API endpoints to list the user's contribution
agreements, and to enter a contribution agreement.

The list of contribution agreements differs from the existing RPC
endpoint in that it only returns a list of the agreements that the
user has entered; it does not include a list of existing agreements.

Bug: Issue 4316
Change-Id: I7d988aa59c06380767d888e22f6e0eaad62d8b34
This commit is contained in:
David Pursehouse
2016-05-02 22:30:59 +09:00
committed by David Pursehouse
parent 9f7e37cbf7
commit 4578763c7a
10 changed files with 526 additions and 0 deletions

View File

@@ -309,6 +309,10 @@ public abstract class AbstractDaemonTest {
return cfg.getBoolean("change", null, "submitWholeTopic", false);
}
protected boolean isContributorAgreementsEnabled() {
return cfg.getBoolean("auth", null, "contributorAgreements", false);
}
protected void beforeTest(Description description) throws Exception {
GerritServer.Description classDesc =
GerritServer.Description.forTestClass(description, configName);