diff options
author | Peter Smit <peter@smitmail.eu> | 2015-02-23 12:34:41 +0200 |
---|---|---|
committer | Peter Smit <peter@smitmail.eu> | 2015-02-23 12:34:41 +0200 |
commit | 556881964fb8137561e9f381d4a5aaef97627cc5 (patch) | |
tree | 32aebddd8c123c540cf04ac6dfd0e503450d9247 /routers/repo/http.go | |
parent | aa68e86206d7d9fc74de8630acfa07dfd7f1bc95 (diff) | |
parent | ee68a826a55c6a4305e7f609db57501a54a5bc47 (diff) | |
download | gitea-556881964fb8137561e9f381d4a5aaef97627cc5.tar.gz gitea-556881964fb8137561e9f381d4a5aaef97627cc5.zip |
Merge branch 'access' into access_rewriteserv
Diffstat (limited to 'routers/repo/http.go')
-rw-r--r-- | routers/repo/http.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/repo/http.go b/routers/repo/http.go index 034b5a7b5e..d47d73ef05 100644 --- a/routers/repo/http.go +++ b/routers/repo/http.go @@ -158,6 +158,11 @@ func Http(ctx *middleware.Context) { return } } + + if !isPull && repo.IsMirror { + ctx.Handle(401, "can't push to mirror", nil) + return + } } } |