fix token list by auth method (#11196)

* add tests to OIDC authmethod and fix entMeta when retrieving auth-methods

* fix oss compilation error
This commit is contained in:
Dhia Ayachi 2021-10-01 12:00:43 -04:00 committed by GitHub
parent 1b9586b65e
commit 8bd52995d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -528,7 +528,9 @@ func aclTokenSetTxn(tx WriteTxn, idx uint64, token *structs.ACLToken, opts ACLTo
}
if token.AuthMethod != "" && !opts.FromReplication {
method, err := getAuthMethodWithTxn(tx, nil, token.AuthMethod, token.ACLAuthMethodEnterpriseMeta.ToEnterpriseMeta())
methodMeta := token.ACLAuthMethodEnterpriseMeta.ToEnterpriseMeta()
methodMeta.Merge(&token.EnterpriseMeta)
method, err := getAuthMethodWithTxn(tx, nil, token.AuthMethod, methodMeta)
if err != nil {
return err
} else if method == nil {