mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-26 06:16:56 +09:00
#1511 Allow local import only for admin users
This commit is contained in:
1 parent
25ec20d525
commit
6f0a41b8b2
18 files changed
+152
-79
No files matched your search
@@ -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