mirror of
https://github.com/owncloud/ocis
synced 2026-04-26 01:35:25 +02:00
make storage users mount id configurable (#5091)
This commit is contained in:
@@ -39,7 +39,6 @@ func DefaultConfig() *config.Config {
|
||||
},
|
||||
Reva: shared.DefaultRevaConfig(),
|
||||
DataServerURL: "http://localhost:9158/data",
|
||||
MountID: "1284d238-aa92-42ce-bdc4-0b0000009157",
|
||||
UploadExpiration: 24 * 60 * 60,
|
||||
Driver: "ocis",
|
||||
Drivers: config.Drivers{
|
||||
|
||||
@@ -2,8 +2,10 @@ package parser
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
ociscfg "github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
defaults2 "github.com/owncloud/ocis/v2/ocis-pkg/config/defaults"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
|
||||
"github.com/owncloud/ocis/v2/services/storage-users/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/storage-users/pkg/config/defaults"
|
||||
@@ -38,5 +40,12 @@ func Validate(cfg *config.Config) error {
|
||||
return shared.MissingJWTTokenError(cfg.Service.Name)
|
||||
}
|
||||
|
||||
if cfg.MountID == "" {
|
||||
return fmt.Errorf("The storage users mount ID has not been configured for %s. "+
|
||||
"Make sure your %s config contains the proper values "+
|
||||
"(e.g. by running ocis init or setting it manually in "+
|
||||
"the config/corresponding environment variable).",
|
||||
"storage-users", defaults2.BaseConfigPath())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user