mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-30 08:50:49 -06:00
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:
5
changelog/unreleased/remove-useless-vars.md
Normal file
5
changelog/unreleased/remove-useless-vars.md
Normal file
@@ -0,0 +1,5 @@
|
||||
Bugfix: Remove invalid environment variables
|
||||
|
||||
We have removed two spaces related environment variables (whether project spaces and the share jail are enabled) and hardcoded the only allowed options. Misusing those variables would have resulted in invalid config.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/8303
|
||||
@@ -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."`
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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{}{
|
||||
|
||||
Reference in New Issue
Block a user