Merge pull request #3626 from owncloud/spaces-capability-feature-flags

Spaces capability feature flags
This commit is contained in:
Benedikt Kulmann
2022-05-02 12:59:53 +02:00
committed by GitHub
5 changed files with 14 additions and 4 deletions

View File

@@ -0,0 +1,5 @@
Enhancement: Added `share_jail` and `projects` feature flags in spaces capability
We've added feature flags to the `spaces` capability to indicate to clients which features are supposed to be shown to users.
https://github.com/owncloud/ocis/pull/3626

View File

@@ -9,4 +9,5 @@ https://github.com/owncloud/ocis/pull/3570
https://github.com/owncloud/ocis/pull/3601
https://github.com/owncloud/ocis/pull/3605
https://github.com/owncloud/ocis/pull/3611
https://github.com/owncloud/ocis/pull/3621
https://github.com/owncloud/ocis/issues/3621
https://github.com/owncloud/ocis/pull/3637

View File

@@ -286,8 +286,10 @@ func frontendConfigFromStruct(c *cli.Context, cfg *config.Config, filesCfg map[s
},
},
"spaces": map[string]interface{}{
"version": "0.0.1",
"enabled": cfg.EnableProjectSpaces,
"version": "0.0.1",
"enabled": cfg.EnableProjectSpaces || cfg.EnableShareJail,
"projects": cfg.EnableProjectSpaces,
"share_jail": cfg.EnableShareJail,
},
},
"version": map[string]interface{}{

View File

@@ -23,7 +23,8 @@ type Config struct {
SkipUserGroupsInToken bool `yaml:"skip_users_groups_in_token"`
EnableFavorites bool `yaml:"favorites"`
EnableProjectSpaces bool `yaml:"enable_project_spaces"`
EnableProjectSpaces bool `yaml:"enable_project_spaces" env:"FRONTEND_ENABLE_PROJECT_SPACES" desc:"Indicates to clients that project spaces are supposed to be made available."`
EnableShareJail bool `yaml:"enable_share_jail" env:"FRONTEND_ENABLE_SHARE_JAIL" desc:"Indicates to clients that the share jail is supposed to be used."`
UploadMaxChunkSize int `yaml:"upload_max_chunk_size"`
UploadHTTPMethodOverride string `yaml:"upload_http_method_override"`
DefaultUploadProtocol string `yaml:"default_upload_protocol"`

View File

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