| | |
| | | }
|
| | |
|
| | | if (isPatchsetRef(cmd.getRefName()) && processPatchsets) {
|
| | |
|
| | | if (ticketService == null) {
|
| | | sendRejection(cmd, "Sorry, the ticket service is unavailable and can not accept patchsets at this time.");
|
| | | continue;
|
| | |
| | | continue;
|
| | | }
|
| | |
|
| | | if (cmd.getNewId().equals(ObjectId.zeroId())) {
|
| | | // ref deletion request
|
| | | if (cmd.getRefName().startsWith(Constants.R_TICKET)) {
|
| | | if (user.canDeleteRef(repository)) {
|
| | | batch.addCommand(cmd);
|
| | | } else {
|
| | | sendRejection(cmd, "Sorry, you do not have permission to delete {}", cmd.getRefName());
|
| | | }
|
| | | } else {
|
| | | sendRejection(cmd, "Sorry, you can not delete {}", cmd.getRefName());
|
| | | }
|
| | | continue;
|
| | | }
|
| | |
|
| | | if (patchsetRefCmd != null) {
|
| | | sendRejection(cmd, "You may only push one patchset at a time.");
|
| | | continue;
|