make only home storage default to enable home
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user