Skip to content

Commit

Permalink
Merge ac13bf1 into backport/jer/fix-ro-policy-lookup/eagerly-assuring…
Browse files Browse the repository at this point in the history
…-scorpion
  • Loading branch information
hc-github-team-consul-core authored Aug 3, 2023
2 parents b2d1d54 + ac13bf1 commit 531ac4a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions command/acl/acl_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ func GetTokenAccessorIDFromPartial(client *api.Client, partialAccessorID string)

func GetPolicyIDFromPartial(client *api.Client, partialID string) (string, error) {
// try the builtin policies (by name) first
for _, policy := range structs.ACLBuiltinPolicies {
if partialID == policy.Name {
return policy.ID, nil
}
}

if policy, ok := structs.ACLBuiltinPolicies[partialID]; ok {
return policy.ID, nil
}
Expand Down

0 comments on commit 531ac4a

Please sign in to comment.