make only home storage default to enable home

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2020-09-08 14:14:19 +02:00
parent 259e564092
commit 6d4935c1f3
5 changed files with 18 additions and 2 deletions
+8
View File
@@ -70,6 +70,14 @@ func StorageHome(cfg *config.Config) *cli.Command {
uuid := uuid.Must(uuid.NewV4())
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
// override driver enable home option with home config
if cfg.Reva.Storages.Home.EnableHome {
cfg.Reva.Storages.Common.EnableHome = true
cfg.Reva.Storages.EOS.EnableHome = true
cfg.Reva.Storages.Local.EnableHome = true
cfg.Reva.Storages.OwnCloud.EnableHome = true
cfg.Reva.Storages.S3.EnableHome = true
}
rcfg := map[string]interface{}{
"core": map[string]interface{}{
"max_cpus": cfg.Reva.Users.MaxCPUs,
+1
View File
@@ -103,6 +103,7 @@ type PublicStorage struct {
// StorageConfig combines all available storage driver configuration parts.
type StorageConfig struct {
Home DriverCommon
EOS DriverEOS
Local DriverCommon
OwnCloud DriverOwnCloud
+1 -1
View File
@@ -17,7 +17,7 @@ func DriverOCISWithConfig(cfg *config.Config) []cli.Flag {
},
&cli.BoolFlag{
Name: "storage-ocis-enable-home",
Value: true,
Value: false,
Usage: "enable the creation of home storages",
EnvVars: []string{"REVA_STORAGE_OCIS_ENABLE_HOME"},
Destination: &cfg.Reva.Storages.Common.EnableHome,
+1 -1
View File
@@ -45,7 +45,7 @@ func DriverOwnCloudWithConfig(cfg *config.Config) []cli.Flag {
},
&cli.BoolFlag{
Name: "storage-owncloud-enable-home",
Value: true,
Value: false,
Usage: "enable the creation of home storages",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_ENABLE_HOME"},
Destination: &cfg.Reva.Storages.OwnCloud.EnableHome,
+7
View File
@@ -96,6 +96,13 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_HOME_DATA_SERVER_URL"},
Destination: &cfg.Reva.StorageHome.DataServerURL,
},
&cli.BoolFlag{
Name: "enable-home",
Value: true,
Usage: "enable the creation of home directories",
EnvVars: []string{"REVA_STORAGE_HOME_ENABLE_HOME"},
Destination: &cfg.Reva.Storages.Home.EnableHome,
},
// User provider