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() {
160
160
registerGarbageCollectRepositories ()
161
161
registerRewriteAllPublicKeys ()
162
162
registerRewriteAllPrincipalKeys ()
163
- registerRepositoryUpdateHook ()
163
+ if ! setting .DisableGitHooks {
164
+ registerRepositoryUpdateHook ()
165
+ }
164
166
registerReinitMissingRepositories ()
165
167
registerDeleteMissingRepositories ()
166
168
registerRemoveRandomAvatars ()
Original file line number Diff line number Diff line change 52
52
<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>
53
53
</tr>
54
54
{{end}}
55
+ {{if not DisableGitHooks}}
55
56
<tr>
56
57
<td>{{.i18n.Tr "admin.dashboard.resync_all_hooks"}}</td>
57
58
<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>
58
59
</tr>
60
+ {{end}}
59
61
<tr>
60
62
<td>{{.i18n.Tr "admin.dashboard.reinit_missing_repos"}}</td>
61
63
<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 116
116
<input name="restricted" type="checkbox" {{if .User.IsRestricted}}checked{{end}}>
117
117
</div>
118
118
</div>
119
- <div class="inline field">
119
+ <div class="inline field"{{if DisableGitHooks}} hidden{{end}} >
120
120
<div class="ui checkbox tooltip" data-content="{{.i18n.Tr "admin.users.allow_git_hook_tooltip"}}" data-variation="very wide">
121
121
<label><strong>{{.i18n.Tr "admin.users.allow_git_hook"}}</strong></label>
122
122
<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