Skip to content

Commit

Permalink
Revert some lines
Browse files Browse the repository at this point in the history
  • Loading branch information
jjacobson93 committed Aug 3, 2023
1 parent 8a9db4c commit ac13bf1
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 @@ -46,6 +46,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 ac13bf1

Please sign in to comment.