File tree Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Original file line number Diff line number Diff 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 },
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff line change 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}}">
You can’t perform that action at this time.
0 commit comments