From 5c39fd5e53da5c51a1e4eb58bdee7790e82318d4 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 25 Sep 2025 10:19:33 +0200 Subject: [PATCH] chore: add config for capability CheckForUpdates (#1556) --- services/frontend/pkg/config/config.go | 1 + services/frontend/pkg/config/defaults/defaultconfig.go | 1 + services/frontend/pkg/revaconfig/config.go | 1 + 3 files changed, 3 insertions(+) diff --git a/services/frontend/pkg/config/config.go b/services/frontend/pkg/config/config.go index 0db8059738..ee43f35167 100644 --- a/services/frontend/pkg/config/config.go +++ b/services/frontend/pkg/config/config.go @@ -49,6 +49,7 @@ type Config struct { LDAPServerWriteEnabled bool `yaml:"ldap_server_write_enabled" env:"OC_LDAP_SERVER_WRITE_ENABLED;FRONTEND_LDAP_SERVER_WRITE_ENABLED" desc:"Allow creating, modifying and deleting LDAP users via the GRAPH API. This can only be set to 'true' when keeping default settings for the LDAP user and group attribute types (the 'OC_LDAP_USER_SCHEMA_* and 'OC_LDAP_GROUP_SCHEMA_* variables)." introductionVersion:"1.0.0"` EditLoginAllowedDisabled bool `yaml:"edit_login_allowed_disabled" env:"FRONTEND_EDIT_LOGIN_ALLOWED_DISABLED" desc:"Used to set if login is allowed/forbidden for for User." introductionVersion:"3.4.0"` FullTextSearch bool `yaml:"full_text_search" env:"FRONTEND_FULL_TEXT_SEARCH_ENABLED" desc:"Set to true to signal the web client that full-text search is enabled." introductionVersion:"1.0.0"` + CheckForUpdates bool `yaml:"check_for_updates" env:"FRONTEND_CHECK_FOR_UPDATES" desc:"Enable automatic checking for updates. Defaults to true." introductionVersion:"3.6.0"` Middleware Middleware `yaml:"middleware"` diff --git a/services/frontend/pkg/config/defaults/defaultconfig.go b/services/frontend/pkg/config/defaults/defaultconfig.go index b5b5eff42b..5b572c7b30 100644 --- a/services/frontend/pkg/config/defaults/defaultconfig.go +++ b/services/frontend/pkg/config/defaults/defaultconfig.go @@ -88,6 +88,7 @@ func DefaultConfig() *config.Config { DefaultLinkPermissions: 1, SearchMinLength: 3, Edition: "", + CheckForUpdates: true, Checksums: config.Checksums{ SupportedTypes: []string{"sha1", "md5", "adler32"}, PreferredUploadType: "sha1", diff --git a/services/frontend/pkg/revaconfig/config.go b/services/frontend/pkg/revaconfig/config.go index ba39bbb70b..4c07140c7c 100644 --- a/services/frontend/pkg/revaconfig/config.go +++ b/services/frontend/pkg/revaconfig/config.go @@ -214,6 +214,7 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string "productversion": version.GetString(), "hostname": "", }, + "check_for_updates": cfg.CheckForUpdates, "support_url_signing": true, "support_sse": !cfg.DisableSSE, },