Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spaces capability feature flags #3626

Merged
merged 1 commit into from
May 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog/unreleased/spaces-capabilities.md
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion changelog/unreleased/update-reva.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 4 additions & 2 deletions extensions/frontend/pkg/command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}{
Expand Down
3 changes: 2 additions & 1 deletion extensions/frontend/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
1 change: 1 addition & 0 deletions extensions/frontend/pkg/config/defaults/defaultconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func DefaultConfig() *config.Config {
PublicURL: "https://localhost:9200",
EnableFavorites: false,
EnableProjectSpaces: true,
EnableShareJail: true,
UploadMaxChunkSize: 1e+8,
UploadHTTPMethodOverride: "",
DefaultUploadProtocol: "tus",
Expand Down