diff options
Diffstat (limited to 'modules/middleware')
-rw-r--r-- | modules/middleware/repo.go | 2 |
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 } |