Fix missing return after %submit is rejected

Using %submit is currently only allowed if the caller has
Submit granted on refs/for/$branch. Early return once it
is known submit permission is missing.

Change-Id: I8da76454bf1efdf9fbc9ec662e1711489dbce009
This commit is contained in:
Shawn Pearce
2014-12-10 16:40:04 -08:00
parent b364901445
commit d07a5ab586

View File

@@ -1315,6 +1315,7 @@ public class ReceiveCommits {
if (magicBranch.isSubmit() && !projectControl.controlForRef(
MagicBranch.NEW_CHANGE + ref).canSubmit()) {
reject(cmd, "submit not allowed");
return;
}
RevWalk walk = rp.getRevWalk();