Skip to content

Commit 9d6c029

Browse files
committed
fix
1 parent 0bad02a commit 9d6c029

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

modules/templates/helper.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,6 @@ func NewFuncMap() template.FuncMap {
131131
"EnableTimetracking": func() bool {
132132
return setting.Service.EnableTimetracking
133133
},
134-
"DisableGitHooks": func() bool {
135-
return setting.DisableGitHooks
136-
},
137134
"DisableWebhooks": func() bool {
138135
return setting.DisableWebhooks
139136
},

routers/web/admin/users.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ func editUserCommon(ctx *context.Context) {
313313
ctx.Data["PageIsAdminUsers"] = true
314314
ctx.Data["DisableRegularOrgCreation"] = setting.Admin.DisableRegularOrgCreation
315315
ctx.Data["DisableMigrations"] = setting.Repository.DisableMigrations
316+
ctx.Data["DisableGitHooks"] = setting.DisableGitHooks
316317
ctx.Data["AllowedUserVisibilityModes"] = setting.Service.AllowedUserVisibilityModesSlice.ToVisibleTypeSlice()
317318
ctx.Data["DisableGravatar"] = setting.Config().Picture.DisableGravatar.Value(ctx)
318319
}

templates/admin/user/edit.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@
128128
<input name="restricted" type="checkbox" {{if .User.IsRestricted}}checked{{end}}>
129129
</div>
130130
</div>
131-
<div class="inline field {{if DisableGitHooks}}tw-hidden{{end}}">
131+
<div class="inline field {{if .DisableGitHooks}}tw-hidden{{end}}">
132132
<div class="ui checkbox" data-tooltip-content="{{ctx.Locale.Tr "admin.users.allow_git_hook_tooltip"}}">
133133
<label><strong>{{ctx.Locale.Tr "admin.users.allow_git_hook"}}</strong></label>
134-
<input name="allow_git_hook" type="checkbox" {{if .User.CanEditGitHook}}checked{{end}} {{if DisableGitHooks}}disabled{{end}}>
134+
<input name="allow_git_hook" type="checkbox" {{if .User.CanEditGitHook}}checked{{end}} {{if .DisableGitHooks}}disabled{{end}}>
135135
</div>
136136
</div>
137137
<div class="inline field {{if or (DisableImportLocal) (.DisableMigrations)}}tw-hidden{{end}}">

0 commit comments

Comments
 (0)