James Moger
2011-05-19 9da97003c7f33a64ae5060f413f9c4c5d26efe78
src/com/gitblit/GitBlitServlet.java
@@ -42,16 +42,15 @@
      if (forwardSlash > -1) {
         String repository = url.substring(0, forwardSlash);
         String function = url.substring(forwardSlash + 1);
         String query = req.getQueryString();
         String query = req.getQueryString() == null ? "":req.getQueryString();
         RepositoryModel model = GitBlit.self().getRepositoryModel(repository);
         if (model != null) {
            if (model.accessRestriction.atLeast(AccessRestrictionType.PUSH)) {
         if (model != null) {
            if (model.isFrozen || model.accessRestriction.atLeast(AccessRestrictionType.PUSH)) {
               boolean authorizedUser = req.isUserInRole(repository);
               if (function.startsWith("git-receive-pack") || (query.indexOf("service=git-receive-pack") > -1)) {
                  // Push request
                  boolean pushRestricted = model.accessRestriction.atLeast(AccessRestrictionType.PUSH);
                  if (!pushRestricted || (pushRestricted && authorizedUser)) {
                     // push-unrestricted or push-authorized
                  if (!model.isFrozen && authorizedUser) {
                     // clone-restricted or push-authorized
                     super.service(req, rsp);
                     return;
                  } else {
@@ -64,7 +63,7 @@
                  // Clone request
                  boolean cloneRestricted = model.accessRestriction.atLeast(AccessRestrictionType.CLONE);
                  if (!cloneRestricted || (cloneRestricted && authorizedUser)) {
                     // clone-unrestricted or clone-authorized
                     // push-restricted or clone-authorized
                     super.service(req, rsp);
                     return;
                  } else {