mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-03 06:44:47 +02:00
Add git hooks permission check when generating repository from template
This commit is contained in:
@@ -149,7 +149,7 @@ func GenerateRepository(ctx context.Context, doer, owner *user_model.User, templ
|
||||
}
|
||||
|
||||
// Git Hooks
|
||||
if opts.GitHooks {
|
||||
if opts.GitHooks && doer.CanEditGitHook() {
|
||||
if err = GenerateGitHooks(ctx, templateRepo, generateRepo); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user