diff --git a/pkg/command/storagehome.go b/pkg/command/storagehome.go index 731fc81a6..e63b708d0 100644 --- a/pkg/command/storagehome.go +++ b/pkg/command/storagehome.go @@ -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, diff --git a/pkg/config/config.go b/pkg/config/config.go index a06da1be2..aac373ac6 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -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 diff --git a/pkg/flagset/driverocis.go b/pkg/flagset/driverocis.go index 533b0f150..6338bf081 100644 --- a/pkg/flagset/driverocis.go +++ b/pkg/flagset/driverocis.go @@ -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, diff --git a/pkg/flagset/driverowncloud.go b/pkg/flagset/driverowncloud.go index a9f027423..8d5f0b5ab 100644 --- a/pkg/flagset/driverowncloud.go +++ b/pkg/flagset/driverowncloud.go @@ -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, diff --git a/pkg/flagset/storagehome.go b/pkg/flagset/storagehome.go index c70aeeaad..467417f34 100644 --- a/pkg/flagset/storagehome.go +++ b/pkg/flagset/storagehome.go @@ -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