James Moger
2014-04-17 7baf2e4cd2ef8082b74937e26de75b01e630b5d4
src/main/java/com/gitblit/git/PatchsetReceivePack.java
@@ -309,6 +309,7 @@
         }
         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;
@@ -346,6 +347,20 @@
               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;