1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 02:38:35 +00:00

Remove some unnecessary template helpers (#33069)

DisableGitHooks and DisableImportLocal are only used when editing a
user, so only set them in `editUserCommon`
This commit is contained in:
wxiaoguang
2025-01-01 18:02:34 +08:00
committed by GitHub
parent 57eb9d0b64
commit 2564c15cb0
10 changed files with 182 additions and 185 deletions

View File

@@ -131,15 +131,9 @@ func NewFuncMap() template.FuncMap {
"EnableTimetracking": func() bool {
return setting.Service.EnableTimetracking
},
"DisableGitHooks": func() bool {
return setting.DisableGitHooks
},
"DisableWebhooks": func() bool {
return setting.DisableWebhooks
},
"DisableImportLocal": func() bool {
return !setting.ImportLocalPaths
},
"UserThemeName": userThemeName,
"NotificationSettings": func() map[string]any {
return map[string]any{