mirror of https://github.com/status-im/consul.git
acl: Associate policy ID
This commit is contained in:
parent
b5c9e65175
commit
45f358e715
|
@ -58,6 +58,7 @@ func (c *Cache) getPolicy(id, rules string) (*Policy, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
policy.ID = id
|
||||
c.policyCache.Add(id, policy)
|
||||
return policy, nil
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ const (
|
|||
// Policy is used to represent the policy specified by
|
||||
// an ACL configuration.
|
||||
type Policy struct {
|
||||
ID string `hcl:"-"`
|
||||
Keys []*KeyPolicy `hcl:"key"`
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue