aboutsummaryrefslogtreecommitdiff
path: root/routers/repo/http.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-02-22 22:55:35 -0500
committerUnknwon <u@gogs.io>2015-02-22 22:55:35 -0500
commit10e4b5b6c66d1a1a17d975dea28b090eaa404cad (patch)
tree51fc71aee19cecbd734c63cc08116711c367cd7c /routers/repo/http.go
parent7ccab9cd09eca8fa60fdd519c97c259d4b521abd (diff)
parentfc4dff1b1727682b9641f9238f583cfade2901be (diff)
Merge branch 'access' of github.com:gogits/gogs into access
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 034b5a7b..d47d73ef 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
+ }
}
}