mirror of
https://github.com/status-im/consul.git
synced 2025-01-09 13:26:07 +00:00
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:
parent
8b002d086a
commit
a5b09493ab
@ -528,7 +528,9 @@ func aclTokenSetTxn(tx WriteTxn, idx uint64, token *structs.ACLToken, opts ACLTo
|
|||||||
}
|
}
|
||||||
|
|
||||||
if token.AuthMethod != "" && !opts.FromReplication {
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
} else if method == nil {
|
} else if method == nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user