summaryrefslogtreecommitdiffstats
path: root/routers/repo/http.go
diff options
context:
space:
mode:
authorPeter Smit <peter@smitmail.eu>2015-02-23 12:34:41 +0200
committerPeter Smit <peter@smitmail.eu>2015-02-23 12:34:41 +0200
commit556881964fb8137561e9f381d4a5aaef97627cc5 (patch)
tree32aebddd8c123c540cf04ac6dfd0e503450d9247 /routers/repo/http.go
parentaa68e86206d7d9fc74de8630acfa07dfd7f1bc95 (diff)
parentee68a826a55c6a4305e7f609db57501a54a5bc47 (diff)
downloadgitea-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.go5
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
+ }
}
}