From 341ebdf6cc7414ee8cdb7b1d076e29d0e2232d6d Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Wed, 29 Jul 2026 12:03:57 +0200 Subject: [PATCH] refactor: mark the announcement config as output-only (yaml:"-") The announcement is runtime-managed and injected into config.json; it is not a static yaml config option. Exclude it from yaml (yaml:"-") so it is not presented as a configurable knob, keeping the json tag only for the config.json output. --- services/web/pkg/config/options.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/web/pkg/config/options.go b/services/web/pkg/config/options.go index bc4f4781aa..3a4f037ed9 100644 --- a/services/web/pkg/config/options.go +++ b/services/web/pkg/config/options.go @@ -2,7 +2,7 @@ package config // Options are the option for the web type Options struct { - Announcement *Announcement `json:"announcement,omitempty" yaml:"announcement"` + Announcement *Announcement `json:"announcement,omitempty" yaml:"-"` AccountEditLink *AccountEditLink `json:"accountEditLink,omitempty" yaml:"accountEditLink"` DisableFeedbackLink bool `json:"disableFeedbackLink,omitempty" yaml:"disableFeedbackLink" env:"WEB_OPTION_DISABLE_FEEDBACK_LINK" desc:"Set this option to 'true' to disable the feedback link in the top bar. Keeping it enabled by setting the value to 'false' or with the absence of the option, allows OpenCloud to get feedback from your user base through a dedicated survey website." introductionVersion:"1.0.0"` DisableSponsorLink bool `json:"disableSponsorLink,omitempty" yaml:"disableSponsorLink" env:"WEB_OPTION_DISABLE_SPONSOR_LINK" desc:"Set this option to 'true' to disable the sponsor link in the left sidebar. Keeping it enabled by setting the value to 'false' or by leaving the option unset allows OpenCloud to get support from the community through a dedicated sponsorship program on GitHub." introductionVersion:"7.3.0"` @@ -29,9 +29,9 @@ type Options struct { // value configured statically is ignored. type Announcement struct { // BannerText is the short line shown in the banner. - BannerText string `json:"bannerText,omitempty" yaml:"bannerText"` + BannerText string `json:"bannerText,omitempty" yaml:"-"` // InfoText is the (Markdown) detail shown in a dialog when the banner is clicked. - InfoText string `json:"infoText,omitempty" yaml:"infoText"` + InfoText string `json:"infoText,omitempty" yaml:"-"` } // AccountEditLink are the AccountEditLink options