From f12a433b8571ff7a53a8d8141d8908aa6b0622c5 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 21 Oct 2025 22:31:45 +0200 Subject: [PATCH] chore: add groupware capabilities (#1661) --- services/frontend/pkg/config/config.go | 6 ++++++ services/frontend/pkg/config/defaults/defaultconfig.go | 3 +++ services/frontend/pkg/revaconfig/config.go | 3 +++ 3 files changed, 12 insertions(+) diff --git a/services/frontend/pkg/config/config.go b/services/frontend/pkg/config/config.go index ee43f35167..05dccf08fa 100644 --- a/services/frontend/pkg/config/config.go +++ b/services/frontend/pkg/config/config.go @@ -62,6 +62,8 @@ type Config struct { ConfigurableNotifications bool `yaml:"configurable_notifications" env:"FRONTEND_CONFIGURABLE_NOTIFICATIONS" desc:"Allow configuring notifications via web client." introductionVersion:"1.0.0"` + Groupware Groupware `yaml:"groupware"` + Context context.Context `yaml:"-"` } @@ -195,3 +197,7 @@ type PasswordPolicy struct { MinSpecialCharacters int `yaml:"min_special_characters" env:"OC_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS;FRONTEND_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS" desc:"Define the minimum number of characters from the special characters list to be present. Defaults to 1 if not set." introductionVersion:"1.0.0"` BannedPasswordsList string `yaml:"banned_passwords_list" env:"OC_PASSWORD_POLICY_BANNED_PASSWORDS_LIST;FRONTEND_PASSWORD_POLICY_BANNED_PASSWORDS_LIST" desc:"Path to the 'banned passwords list' file. This only impacts public link password validation. See the documentation for more details." introductionVersion:"1.0.0"` } + +type Groupware struct { + Enabled bool `yaml:"enabled" env:"FRONTEND_GROUPWARE_ENABLED" desc:"Enable groupware features. Defaults to false." introductionVersion:"3.7.0"` +} diff --git a/services/frontend/pkg/config/defaults/defaultconfig.go b/services/frontend/pkg/config/defaults/defaultconfig.go index 5b572c7b30..aed80f2cd3 100644 --- a/services/frontend/pkg/config/defaults/defaultconfig.go +++ b/services/frontend/pkg/config/defaults/defaultconfig.go @@ -139,6 +139,9 @@ func DefaultConfig() *config.Config { MinDigits: 1, MinSpecialCharacters: 1, }, + Groupware: config.Groupware{ + Enabled: false, + }, } } diff --git a/services/frontend/pkg/revaconfig/config.go b/services/frontend/pkg/revaconfig/config.go index 514663bebd..15de92eb98 100644 --- a/services/frontend/pkg/revaconfig/config.go +++ b/services/frontend/pkg/revaconfig/config.go @@ -339,6 +339,9 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string "endpoints": []string{"list", "get", "delete"}, "configurable": cfg.ConfigurableNotifications, }, + "groupware": map[string]interface{}{ + "enabled": cfg.Groupware.Enabled, + }, }, "version": map[string]interface{}{ "product": "OpenCloud",