Add CLA check to ProjectControl.canPushToAtLeastOneRef()
This is a refactoring, it should not change functionality at all. Move CLA check out of ReceiveCommits and into ProjectControl. Create a common Capable class to facilitate this. Change-Id: I43ff798bcb727918eb39b1ec8dc7e14278c91b1f
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
package com.google.gerrit.sshd.commands;
|
||||
|
||||
import com.google.gerrit.common.data.Capable;
|
||||
import com.google.gerrit.reviewdb.Account;
|
||||
import com.google.gerrit.server.IdentifiedUser;
|
||||
import com.google.gerrit.server.git.ReceiveCommits;
|
||||
@@ -70,8 +71,8 @@ final class Receive extends AbstractGitCommand {
|
||||
|
||||
final ReceiveCommits receive = factory.create(projectControl, repo);
|
||||
|
||||
ReceiveCommits.Capable r = receive.canUpload();
|
||||
if (r != ReceiveCommits.Capable.OK) {
|
||||
Capable r = receive.canUpload();
|
||||
if (r != Capable.OK) {
|
||||
throw new UnloggedFailure(1, "\nfatal: " + r.getMessage());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user