Skip to content

Commit d8a98e3

Browse files
author
Gusted
committed
Don't enable update checker by-default
- I recently became aware that this was enabled by-default, I don't necessary agree with that and this should rather be configured by the user(this patch does that on the installation page) as it connects to a homeserver, which I'd prefer to avoid on my instance.
1 parent f211d23 commit d8a98e3

File tree

5 files changed

+11
-2
lines changed

5 files changed

+11
-2
lines changed

options/locale/locale_en-US.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ no_reply_address = Hidden Email Domain
238238
no_reply_address_helper = Domain name for users with a hidden email address. For example, the username 'joe' will be logged in Git as '[email protected]' if the hidden email domain is set to 'noreply.example.org'.
239239
password_algorithm = Password Hash Algorithm
240240
password_algorithm_helper = Set the password hashing algorithm. Algorithms have differing requirements and strength. `argon2` whilst having good characteristics uses a lot of memory and may be inappropriate for small systems.
241+
enable_update_checker = Enable the update checker
242+
enable_update_checker_helper = Checks for new version releases periodically by connecting to gitea.io
241243

242244
[home]
243245
uname_holder = Username or Email Address

routers/install/install.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ func SubmitInstall(ctx *context.Context) {
457457
cfg.Section("service").Key("DEFAULT_ALLOW_CREATE_ORGANIZATION").SetValue(fmt.Sprint(form.DefaultAllowCreateOrganization))
458458
cfg.Section("service").Key("DEFAULT_ENABLE_TIMETRACKING").SetValue(fmt.Sprint(form.DefaultEnableTimetracking))
459459
cfg.Section("service").Key("NO_REPLY_ADDRESS").SetValue(fmt.Sprint(form.NoReplyAddress))
460+
cfg.Section("cron.update_checker").Key("ENABLED").SetValue(fmt.Sprint(form.EnableUpdateChecker))
460461

461462
cfg.Section("").Key("RUN_MODE").SetValue("prod")
462463

services/cron/tasks_extended.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func registerUpdateGiteaChecker() {
151151
}
152152
RegisterTaskFatal("update_checker", &UpdateCheckerConfig{
153153
BaseConfig: BaseConfig{
154-
Enabled: true,
154+
Enabled: false,
155155
RunAtStart: false,
156156
Schedule: "@every 168h",
157157
},

services/forms/user_form.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ type InstallForm struct {
6060
DefaultKeepEmailPrivate bool
6161
DefaultAllowCreateOrganization bool
6262
DefaultEnableTimetracking bool
63+
EnableUpdateChecker bool
6364
NoReplyAddress string
6465

6566
PasswordAlgorithm string

templates/install.tmpl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@
163163
<span class="help">{{.locale.Tr "install.log_root_path_helper"}}</span>
164164
</div>
165165

166-
167166
<!-- Optional Settings -->
168167
<h4 class="ui dividing header">{{.locale.Tr "install.optional_title"}}</h4>
169168

@@ -284,6 +283,12 @@
284283
<input name="default_enable_timetracking" type="checkbox" {{if .default_enable_timetracking}}checked{{end}}>
285284
</div>
286285
</div>
286+
<div class="inline field">
287+
<div class="ui checkbox">
288+
<label class="tooltip" data-content="{{.locale.Tr "install.enable_update_checker_helper"}}"><strong>{{.locale.Tr "install.enable_update_checker"}}</strong></label>
289+
<input name="enable_update_checker" type="checkbox" {{if .enable_update_checker}}checked{{end}}>
290+
</div>
291+
</div>
287292
<div class="inline field">
288293
<label for="no_reply_address">{{.locale.Tr "install.no_reply_address"}}</label>
289294
<input id="_no_reply_address" name="no_reply_address" value="{{.no_reply_address}}">

0 commit comments

Comments
 (0)