Add new capability for announcing share jail

This commit is contained in:
Benedikt Kulmann
2022-05-02 12:07:07 +02:00
parent bf936c8da1
commit 1c5bfacac1
5 changed files with 14 additions and 4 deletions
@@ -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
+2 -1
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/3601
https://github.com/owncloud/ocis/pull/3605 https://github.com/owncloud/ocis/pull/3605
https://github.com/owncloud/ocis/pull/3611 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
+4 -2
View File
@@ -286,8 +286,10 @@ func frontendConfigFromStruct(c *cli.Context, cfg *config.Config, filesCfg map[s
}, },
}, },
"spaces": map[string]interface{}{ "spaces": map[string]interface{}{
"version": "0.0.1", "version": "0.0.1",
"enabled": cfg.EnableProjectSpaces, "enabled": cfg.EnableProjectSpaces || cfg.EnableShareJail,
"projects": cfg.EnableProjectSpaces,
"share_jail": cfg.EnableShareJail,
}, },
}, },
"version": map[string]interface{}{ "version": map[string]interface{}{
+2 -1
View File
@@ -23,7 +23,8 @@ type Config struct {
SkipUserGroupsInToken bool `yaml:"skip_users_groups_in_token"` SkipUserGroupsInToken bool `yaml:"skip_users_groups_in_token"`
EnableFavorites bool `yaml:"favorites"` 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"` UploadMaxChunkSize int `yaml:"upload_max_chunk_size"`
UploadHTTPMethodOverride string `yaml:"upload_http_method_override"` UploadHTTPMethodOverride string `yaml:"upload_http_method_override"`
DefaultUploadProtocol string `yaml:"default_upload_protocol"` DefaultUploadProtocol string `yaml:"default_upload_protocol"`
@@ -33,6 +33,7 @@ func DefaultConfig() *config.Config {
PublicURL: "https://localhost:9200", PublicURL: "https://localhost:9200",
EnableFavorites: false, EnableFavorites: false,
EnableProjectSpaces: true, EnableProjectSpaces: true,
EnableShareJail: true,
UploadMaxChunkSize: 1e+8, UploadMaxChunkSize: 1e+8,
UploadHTTPMethodOverride: "", UploadHTTPMethodOverride: "",
DefaultUploadProtocol: "tus", DefaultUploadProtocol: "tus",