Merge pull request #6248 from owncloud/edition

make edition configurable
This commit is contained in:
Michael Barz
2023-05-08 12:01:30 +02:00
committed by GitHub
4 changed files with 4 additions and 2 deletions

View File

@@ -37,6 +37,7 @@ type Config struct {
EnableFederatedSharingIncoming bool `yaml:"enable_federated_sharing_incoming" env:"FRONTEND_ENABLE_FEDERATED_SHARING_INCOMING" desc:"Changing this value is NOT supported. Enables support for incoming federated sharing for clients. The backend behaviour is not changed."`
EnableFederatedSharingOutgoing bool `yaml:"enable_federated_sharing_outgoing" env:"FRONTEND_ENABLE_FEDERATED_SHARING_OUTGOING" desc:"Changing this value is NOT supported. Enables support for outgoing federated sharing for clients. The backend behaviour is not changed."`
SearchMinLength int `yaml:"search_min_length" env:"FRONTEND_SEARCH_MIN_LENGTH" desc:"Minimum number of characters to enter before a client should start a search for Share receivers. This setting can be used to customize the user experience if e.g too many results are displayed."`
Edition string `yaml:"edition" env:"OCIS_EDITION;FRONTEND_EDITION"`
PublicURL string `yaml:"public_url" env:"OCIS_URL;FRONTEND_PUBLIC_URL" desc:"The public facing URL of the oCIS frontend."`

View File

@@ -87,6 +87,7 @@ func DefaultConfig() *config.Config {
DefaultUploadProtocol: "tus",
EnableResharing: true,
SearchMinLength: 3,
Edition: "Community",
Checksums: config.Checksums{
SupportedTypes: []string{"sha1", "md5", "adler32"},
PreferredUploadType: "sha1",

View File

@@ -191,7 +191,7 @@ func FrontendConfigFromStruct(cfg *config.Config) (map[string]interface{}, error
"needsDbUpgrade": false,
"version": version.Legacy,
"versionstring": version.LegacyString,
"edition": "Community",
"edition": cfg.Edition,
"productname": "Infinite Scale",
"product": "Infinite Scale",
"productversion": version.GetString(),

View File

@@ -84,5 +84,5 @@ type Status struct {
Product string
ProductName string
ProductVersion string
Edition string
Edition string `yaml:"edition" env:"OCIS_EDITION;OCDAV_EDITION"`
}