#1511 Allow local import only for admin users
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user