forked from NYANDEV/forgejo
#1511 Allow local import only for admin users
This commit is contained in:
parent
25ec20d525
commit
6f0a41b8b2
18 changed files with 152 additions and 79 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue