Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions services/frontend/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ type Config struct {

Groupware Groupware `yaml:"groupware"`

OpenXchange OpenXchange `yaml:"open_xchange"`

Context context.Context `yaml:"-"`
}

Expand Down Expand Up @@ -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%%"`
}
4 changes: 4 additions & 0 deletions services/frontend/pkg/config/defaults/defaultconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ func DefaultConfig() *config.Config {
Groupware: config.Groupware{
Enabled: false,
},
OpenXchange: config.OpenXchange{
Enabled: false,
ApiUrl: "",
},
}
}

Expand Down
4 changes: 4 additions & 0 deletions services/frontend/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down