Merge "Do not require 'Create Reference' for pushing annotated tag"

This commit is contained in:
David Pursehouse
2017-06-27 12:03:44 +00:00
committed by Gerrit Code Review
5 changed files with 133 additions and 96 deletions

View File

@@ -1070,14 +1070,7 @@ public class ReceiveCommits {
}
RefControl ctl = projectControl.controlForRef(cmd.getRefName());
boolean ok;
try {
permissions.ref(cmd.getRefName()).check(RefPermission.CREATE);
ok = true;
} catch (AuthException err) {
ok = false;
}
if (ok && ctl.canCreate(rp.getRepository(), obj)) {
if (ctl.canCreate(rp.getRepository(), obj)) {
if (!validRefOperation(cmd)) {
return;
}