From d0d438f480e29a5ebaf64449a5c3e7f4ebb13690 Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Wed, 11 May 2011 22:33:16 -0400 Subject: [PATCH] Clarified access restrictions. --- src/com/gitblit/GitBlitServlet.java | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/com/gitblit/GitBlitServlet.java b/src/com/gitblit/GitBlitServlet.java index cb23e47..ffdc1b0 100644 --- a/src/com/gitblit/GitBlitServlet.java +++ b/src/com/gitblit/GitBlitServlet.java @@ -49,9 +49,8 @@ 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 (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 { -- Gitblit v1.9.1