From 32dcaefafa6039e8fe27d263290e33ce5e5d3aa5 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Mon, 17 Nov 2014 14:53:41 -0500 Subject: fox #620 --- modules/middleware/repo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/middleware') 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 } -- cgit v1.2.3