Merge pull request #8303 from owncloud/remove-spaces-config-options

fix: hardcode config for spaces which was not allowed to change
This commit is contained in:
Michael Barz
2024-02-02 10:22:00 +01:00
committed by GitHub
4 changed files with 8 additions and 7 deletions

View File

@@ -27,8 +27,6 @@ type Config struct {
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"FRONTEND_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token."`
EnableFavorites bool `yaml:"enable_favorites" env:"FRONTEND_ENABLE_FAVORITES" desc:"Enables the support for favorites in the clients."`
EnableProjectSpaces bool `yaml:"enable_project_spaces" env:"FRONTEND_ENABLE_PROJECT_SPACES" desc:"Changing this value is NOT supported. Indicates to clients that project spaces are supposed to be made available."`
EnableShareJail bool `yaml:"enable_share_jail" env:"FRONTEND_ENABLE_SHARE_JAIL" desc:"Changing this value is NOT supported. Indicates to clients that the share jail is supposed to be used."`
MaxQuota uint64 `yaml:"max_quota" env:"OCIS_SPACES_MAX_QUOTA;FRONTEND_MAX_QUOTA" desc:"Set the global max quota value in bytes. A value of 0 equals unlimited. The value is provided via capabilities."`
UploadMaxChunkSize int `yaml:"upload_max_chunk_size" env:"FRONTEND_UPLOAD_MAX_CHUNK_SIZE" desc:"Sets the max chunk sizes in bytes for uploads via the clients."`
UploadHTTPMethodOverride string `yaml:"upload_http_method_override" env:"FRONTEND_UPLOAD_HTTP_METHOD_OVERRIDE" desc:"Advise TUS to replace PATCH requests by POST requests."`

View File

@@ -81,8 +81,6 @@ func DefaultConfig() *config.Config {
Reva: shared.DefaultRevaConfig(),
PublicURL: "https://localhost:9200",
EnableFavorites: false,
EnableProjectSpaces: true,
EnableShareJail: true,
UploadMaxChunkSize: 1e+7,
UploadHTTPMethodOverride: "",
DefaultUploadProtocol: "tus",

View File

@@ -286,9 +286,9 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
},
"spaces": map[string]interface{}{
"version": "1.0.0",
"enabled": cfg.EnableProjectSpaces || cfg.EnableShareJail,
"projects": cfg.EnableProjectSpaces,
"share_jail": cfg.EnableShareJail,
"enabled": true,
"projects": true,
"share_jail": true,
"max_quota": cfg.MaxQuota,
},
"search": map[string]interface{}{