diff options
author | James Moger <james.moger@gitblit.com> | 2014-02-28 14:13:53 -0500 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-03-01 09:20:23 -0500 |
commit | 0b953c80b3fb43a4fcd559591067e719ec346d44 (patch) | |
tree | e54c103f8e0919ffc79a9b39bb12a00f227e31ff /src | |
parent | 388a233e8ec78c5d7279f9cef85245ea3c85534e (diff) | |
download | gitblit-0b953c80b3fb43a4fcd559591067e719ec346d44.tar.gz gitblit-0b953c80b3fb43a4fcd559591067e719ec346d44.zip |
Move push authorization from the ARF to the receive pack
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/gitblit/servlet/GitFilter.java | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/main/java/com/gitblit/servlet/GitFilter.java b/src/main/java/com/gitblit/servlet/GitFilter.java index 402f72d3..f9c062d2 100644 --- a/src/main/java/com/gitblit/servlet/GitFilter.java +++ b/src/main/java/com/gitblit/servlet/GitFilter.java @@ -191,15 +191,8 @@ public class GitFilter extends AccessRestrictionFilter { 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)) {
|