Make the project spaces capability configurable

Some deployments don't want to show early stages of the spaces feature
set in the clients. It can now be disabled in the capabilities.
This commit is contained in:
Benedikt Kulmann
2022-01-14 10:42:36 +01:00
parent e6847faacc
commit a45f717d3f
3 changed files with 7 additions and 1 deletions

View File

@@ -294,7 +294,7 @@ func frontendConfigFromStruct(c *cli.Context, cfg *config.Config, filesCfg map[s
},
"spaces": map[string]interface{}{
"version": "0.0.1",
"enabled": true,
"enabled": cfg.Reva.Frontend.ProjectSpaces,
},
},
"version": map[string]interface{}{

View File

@@ -155,6 +155,7 @@ type FrontendPort struct {
ArchiverPrefix string `ocisConfig:"archiver_prefix"`
DatagatewayPrefix string `ocisConfig:"data_gateway_prefix"`
Favorites bool `ocisConfig:"favorites"`
ProjectSpaces bool `ocisConfig:"project_spaces"`
OCDavInsecure bool `ocisConfig:"ocdav_insecure"`
OCDavPrefix string `ocisConfig:"ocdav_prefix"`
OCSPrefix string `ocisConfig:"ocs_prefix"`
@@ -815,6 +816,10 @@ func structMappings(cfg *Config) []shared.EnvBinding {
EnvVars: []string{"STORAGE_FRONTEND_FAVORITES"},
Destination: &cfg.Reva.Frontend.Favorites,
},
{
EnvVars: []string{"STORAGE_FRONTEND_PROJECT_SPACES"},
Destination: &cfg.Reva.Frontend.ProjectSpaces,
},
{
EnvVars: []string{"STORAGE_FRONTEND_OCDAV_PREFIX"},
Destination: &cfg.Reva.Frontend.OCDavPrefix,

View File

@@ -239,6 +239,7 @@ func DefaultConfig() *Config {
ArchiverPrefix: "archiver",
DatagatewayPrefix: "data",
Favorites: false,
ProjectSpaces: true,
OCDavInsecure: false, // true?
OCDavPrefix: "",
OCSPrefix: "ocs",