mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 19:17:58 +00:00
Added a nil check for config and renamed org field internally.
This commit is contained in:
@@ -107,7 +107,7 @@ func (b *backend) verifyCredentials(req *logical.Request, token string) (*verify
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
if config.Org == "" {
|
||||
if config.Organization == "" {
|
||||
return nil, logical.ErrorResponse(
|
||||
"configure the github credential backend first"), nil
|
||||
}
|
||||
@@ -152,7 +152,7 @@ func (b *backend) verifyCredentials(req *logical.Request, token string) (*verify
|
||||
}
|
||||
|
||||
for _, o := range allOrgs {
|
||||
if strings.ToLower(*o.Login) == strings.ToLower(config.Org) {
|
||||
if strings.ToLower(*o.Login) == strings.ToLower(config.Organization) {
|
||||
org = o
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user