#1511 Allow local import only for admin users

This commit is contained in:
Unknwon committed 2015-11-03 18:40:52 -05:00
1 parent 25ec20d525
commit 6f0a41b8b2
18 files changed
+152 -79

No files matched your search

+1 -1
View File
@@ -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
}