diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2025-01-01 18:02:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-01 18:02:34 +0800 |
commit | 2564c15cb006a551ab21dac66369c363a4e78473 (patch) | |
tree | 72859af96eee778816c52e2ba972e76507fdbcf1 /routers/web/admin/users.go | |
parent | 57eb9d0b644bb893ffb90d0066066a3971de3f1a (diff) | |
download | gitea-2564c15cb006a551ab21dac66369c363a4e78473.tar.gz gitea-2564c15cb006a551ab21dac66369c363a4e78473.zip |
Remove some unnecessary template helpers (#33069)
DisableGitHooks and DisableImportLocal are only used when editing a
user, so only set them in `editUserCommon`
Diffstat (limited to 'routers/web/admin/users.go')
-rw-r--r-- | routers/web/admin/users.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/web/admin/users.go b/routers/web/admin/users.go index be2ba4424c..f6a3af1c86 100644 --- a/routers/web/admin/users.go +++ b/routers/web/admin/users.go @@ -313,6 +313,8 @@ func editUserCommon(ctx *context.Context) { ctx.Data["PageIsAdminUsers"] = true ctx.Data["DisableRegularOrgCreation"] = setting.Admin.DisableRegularOrgCreation ctx.Data["DisableMigrations"] = setting.Repository.DisableMigrations + ctx.Data["DisableGitHooks"] = setting.DisableGitHooks + ctx.Data["DisableImportLocal"] = !setting.ImportLocalPaths ctx.Data["AllowedUserVisibilityModes"] = setting.Service.AllowedUserVisibilityModesSlice.ToVisibleTypeSlice() ctx.Data["DisableGravatar"] = setting.Config().Picture.DisableGravatar.Value(ctx) } |