diff --git a/services/frontend/pkg/config/config.go b/services/frontend/pkg/config/config.go index 96a475fb5c..b9590a4e37 100644 --- a/services/frontend/pkg/config/config.go +++ b/services/frontend/pkg/config/config.go @@ -63,6 +63,8 @@ type Config struct { Groupware Groupware `yaml:"groupware"` + OpenXchange OpenXchange `yaml:"open_xchange"` + Context context.Context `yaml:"-"` } @@ -223,3 +225,8 @@ type PasswordPolicy struct { type Groupware struct { Enabled bool `yaml:"enabled" env:"FRONTEND_GROUPWARE_ENABLED" desc:"Enable groupware features. Defaults to false." introductionVersion:"3.7.0"` } + +type OpenXchange struct { + Enabled bool `yaml:"enabled" env:"FRONTEND_OPENXCHANGE_ENABLED" desc:"Enable Open-Xchange integration. Defaults to false." introductionVersion:"%%NEXT_PRODUCTION_VERSION%%"` + ApiUrl string `yaml:"api_url" env:"FRONTEND_OPENXCHANGE_API_URL" desc:"The URL of the Open-Xchange API. Required if Open-Xchange integration is enabled." introductionVersion:"%%NEXT_PRODUCTION_VERSION%%"` +} diff --git a/services/frontend/pkg/config/defaults/defaultconfig.go b/services/frontend/pkg/config/defaults/defaultconfig.go index ee6825caf6..dcac09dfda 100644 --- a/services/frontend/pkg/config/defaults/defaultconfig.go +++ b/services/frontend/pkg/config/defaults/defaultconfig.go @@ -158,6 +158,10 @@ func DefaultConfig() *config.Config { Groupware: config.Groupware{ Enabled: false, }, + OpenXchange: config.OpenXchange{ + Enabled: false, + ApiUrl: "", + }, } } diff --git a/services/frontend/pkg/revaconfig/config.go b/services/frontend/pkg/revaconfig/config.go index faa7d3b42d..f295110f63 100644 --- a/services/frontend/pkg/revaconfig/config.go +++ b/services/frontend/pkg/revaconfig/config.go @@ -343,6 +343,10 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string "groupware": map[string]any{ "enabled": cfg.Groupware.Enabled, }, + "open_xchange": map[string]any{ + "enabled": cfg.OpenXchange.Enabled, + "api_url": cfg.OpenXchange.ApiUrl, + }, }, "version": map[string]any{ "product": "OpenCloud",