James Moger
2014-02-28 0b953c80b3fb43a4fcd559591067e719ec346d44
Move push authorization from the ARF to the receive pack
1 files modified
11 ■■■■ changed files
src/main/java/com/gitblit/servlet/GitFilter.java 11 ●●●● patch | view | raw | blame | history
src/main/java/com/gitblit/servlet/GitFilter.java
@@ -191,15 +191,8 @@
            return false;
        }
        if (action.equals(gitReceivePack)) {
            // Push request
            if (user.canPush(repository)) {
                return true;
            } else {
                // user is unauthorized to push to this repository
                logger.warn(MessageFormat.format("user {0} is not authorized to push to {1}",
                        user.username, repository));
                return false;
            }
            // push permissions are enforced in the receive pack
            return true;
        } else if (action.equals(gitUploadPack)) {
            // Clone request
            if (user.canClone(repository)) {