File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,9 @@ func initExtendedTasks() {
160160 registerGarbageCollectRepositories ()
161161 registerRewriteAllPublicKeys ()
162162 registerRewriteAllPrincipalKeys ()
163- registerRepositoryUpdateHook ()
163+ if ! setting .DisableGitHooks {
164+ registerRepositoryUpdateHook ()
165+ }
164166 registerReinitMissingRepositories ()
165167 registerDeleteMissingRepositories ()
166168 registerRemoveRandomAvatars ()
Original file line number Diff line number Diff line change 5252 <td><button type="submit" class="ui green button" name="op" value="resync_all_sshprincipals">{{svg "octicon-play" 16}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td>
5353 </tr>
5454 {{end}}
55+ {{if not DisableGitHooks}}
5556 <tr>
5657 <td>{{.i18n.Tr "admin.dashboard.resync_all_hooks"}}</td>
5758 <td><button type="submit" class="ui green button" name="op" value="resync_all_hooks">{{svg "octicon-play"}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td>
5859 </tr>
60+ {{end}}
5961 <tr>
6062 <td>{{.i18n.Tr "admin.dashboard.reinit_missing_repos"}}</td>
6163 <td><button type="submit" class="ui green button" name="op" value="reinit_missing_repos">{{svg "octicon-play"}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td>
Original file line number Diff line number Diff line change 116116 <input name="restricted" type="checkbox" {{if .User.IsRestricted}}checked{{end}}>
117117 </div>
118118 </div>
119- <div class="inline field">
119+ <div class="inline field"{{if DisableGitHooks}} hidden{{end}} >
120120 <div class="ui checkbox tooltip" data-content="{{.i18n.Tr "admin.users.allow_git_hook_tooltip"}}" data-variation="very wide">
121121 <label><strong>{{.i18n.Tr "admin.users.allow_git_hook"}}</strong></label>
122122 <input name="allow_git_hook" type="checkbox" {{if .User.CanEditGitHook}}checked{{end}} {{if DisableGitHooks}}disabled{{end}}>
You can’t perform that action at this time.
0 commit comments