Allow contributor agreements to be optional
By default the contributor agreements are disabled, as there are no agreements in the database. Admins which require agreements must enable them in system_config. This permits friendly community installations, such as a corporate location, where access automatically implies agreement to contribute because it is work-for-hire. Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -278,6 +278,7 @@ public class GerritServer {
|
||||
final GerritConfig r = new GerritConfig();
|
||||
r.setCanonicalUrl(getCanonicalURL());
|
||||
r.setSshdPort(sConfig.sshdPort);
|
||||
r.setUseContributorAgreements(sConfig.useContributorAgreements);
|
||||
if (sConfig.gitwebUrl != null) {
|
||||
r.setGitwebLink(new GitwebLink(sConfig.gitwebUrl));
|
||||
}
|
||||
|
||||
@@ -89,7 +89,9 @@ class Receive extends AbstractGitCommand {
|
||||
@Override
|
||||
protected void runImpl() throws IOException, Failure {
|
||||
server = getGerritServer();
|
||||
verifyActiveContributorAgreement();
|
||||
if (Common.getGerritConfig().isUseContributorAgreements()) {
|
||||
verifyActiveContributorAgreement();
|
||||
}
|
||||
loadMyEmails();
|
||||
lookup(reviewerId, "reviewer", reviewerEmail);
|
||||
lookup(ccId, "cc", ccEmail);
|
||||
|
||||
Reference in New Issue
Block a user