summaryrefslogtreecommitdiffstats
path: root/modules/middleware
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-11-17 14:53:41 -0500
committerUnknwon <joe2010xtmf@163.com>2014-11-17 14:53:41 -0500
commit32dcaefafa6039e8fe27d263290e33ce5e5d3aa5 (patch)
tree689cfa7791c40b3d25a801c7b7cc3bf07f23ed7f /modules/middleware
parentd1a60e364383b877fd98b853d94b739cb171fe9c (diff)
downloadgitea-32dcaefafa6039e8fe27d263290e33ce5e5d3aa5.tar.gz
gitea-32dcaefafa6039e8fe27d263290e33ce5e5d3aa5.zip
fox #620
Diffstat (limited to 'modules/middleware')
-rw-r--r--modules/middleware/repo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go
index 2d311d2131..0aae122d22 100644
--- a/modules/middleware/repo.go
+++ b/modules/middleware/repo.go
@@ -454,7 +454,7 @@ func RequireTrueOwner() macaron.Handler {
// GitHookService checks if repsitory Git hooks service has been enabled.
func GitHookService() macaron.Handler {
return func(ctx *Context) {
- if !setting.Service.EnableGitHooks {
+ if !ctx.User.AllowGitHook && !ctx.User.IsAdmin {
ctx.Handle(404, "GitHookService", nil)
return
}