diff --git a/changelog/unreleased/spaces-capabilities.md b/changelog/unreleased/spaces-capabilities.md new file mode 100644 index 00000000000..f2a90c40767 --- /dev/null +++ b/changelog/unreleased/spaces-capabilities.md @@ -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 diff --git a/changelog/unreleased/update-reva.md b/changelog/unreleased/update-reva.md index 8b4b79c912f..06ddac93e1b 100644 --- a/changelog/unreleased/update-reva.md +++ b/changelog/unreleased/update-reva.md @@ -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 diff --git a/extensions/frontend/pkg/command/command.go b/extensions/frontend/pkg/command/command.go index 96fb5e023c8..b613e8fc76a 100644 --- a/extensions/frontend/pkg/command/command.go +++ b/extensions/frontend/pkg/command/command.go @@ -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{}{ diff --git a/extensions/frontend/pkg/config/config.go b/extensions/frontend/pkg/config/config.go index 7006febe774..a82e1fd42d1 100644 --- a/extensions/frontend/pkg/config/config.go +++ b/extensions/frontend/pkg/config/config.go @@ -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"` diff --git a/extensions/frontend/pkg/config/defaults/defaultconfig.go b/extensions/frontend/pkg/config/defaults/defaultconfig.go index 11f7958f1f3..a1067f1eb5f 100644 --- a/extensions/frontend/pkg/config/defaults/defaultconfig.go +++ b/extensions/frontend/pkg/config/defaults/defaultconfig.go @@ -33,6 +33,7 @@ func DefaultConfig() *config.Config { PublicURL: "https://localhost:9200", EnableFavorites: false, EnableProjectSpaces: true, + EnableShareJail: true, UploadMaxChunkSize: 1e+8, UploadHTTPMethodOverride: "", DefaultUploadProtocol: "tus",