graph: Allow provisioning users with legacy names (#5255)
Via configuration you can now configure to skip the validation of username and instead decide to trust the upstream system that is adding users.
This commit is contained in:
committed by
Ralf Haferkamp
parent
7c9452768e
commit
96239af982
@@ -52,5 +52,15 @@ func Validate(cfg *config.Config) error {
|
||||
"graph", defaults2.BaseConfigPath())
|
||||
}
|
||||
|
||||
switch cfg.API.UsernameMatch {
|
||||
case "default", "none":
|
||||
default:
|
||||
return fmt.Errorf("The username match validator is invalid 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).",
|
||||
"graph", defaults2.BaseConfigPath())
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user