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:
@@ -1315,6 +1315,7 @@ public class ReceiveCommits {
|
|||||||
if (magicBranch.isSubmit() && !projectControl.controlForRef(
|
if (magicBranch.isSubmit() && !projectControl.controlForRef(
|
||||||
MagicBranch.NEW_CHANGE + ref).canSubmit()) {
|
MagicBranch.NEW_CHANGE + ref).canSubmit()) {
|
||||||
reject(cmd, "submit not allowed");
|
reject(cmd, "submit not allowed");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
RevWalk walk = rp.getRevWalk();
|
RevWalk walk = rp.getRevWalk();
|
||||||
|
|||||||
Reference in New Issue
Block a user