aboutsummaryrefslogtreecommitdiffstats
path: root/modules/middleware/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/middleware/repo.go')
-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 97d9050b21..1b3288e52c 100644
--- a/modules/middleware/repo.go
+++ b/modules/middleware/repo.go
@@ -420,7 +420,7 @@ func RequireRepoAdmin() macaron.Handler {
// GitHookService checks if repository Git hooks service has been enabled.
func GitHookService() macaron.Handler {
return func(ctx *Context) {
- if !ctx.User.AllowGitHook && !ctx.User.IsAdmin {
+ if !ctx.User.CanEditGitHook() {
ctx.Handle(404, "GitHookService", nil)
return
}