mirror of https://github.com/hashicorp/consul
Updated swith case to use same branch for async-cache and extend-cache
parent
684674b757
commit
bd023f352e
|
@ -103,8 +103,7 @@ func newACLManager(config *config.RuntimeConfig) (*aclManager, error) {
|
||||||
down = acl.AllowAll()
|
down = acl.AllowAll()
|
||||||
case "deny":
|
case "deny":
|
||||||
down = acl.DenyAll()
|
down = acl.DenyAll()
|
||||||
case "extend-cache":
|
case "async-cache", "extend-cache":
|
||||||
case "async-cache":
|
|
||||||
// Leave the down policy as nil to signal this.
|
// Leave the down policy as nil to signal this.
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("invalid ACL down policy %q", config.ACLDownPolicy)
|
return nil, fmt.Errorf("invalid ACL down policy %q", config.ACLDownPolicy)
|
||||||
|
|
|
@ -277,8 +277,7 @@ ACL_DOWN:
|
||||||
case "allow":
|
case "allow":
|
||||||
c.fireResult(id, acl.AllowAll(), nil)
|
c.fireResult(id, acl.AllowAll(), nil)
|
||||||
return
|
return
|
||||||
case "async-cache":
|
case "async-cache", "extend-cache":
|
||||||
case "extend-cache":
|
|
||||||
if cached != nil {
|
if cached != nil {
|
||||||
c.fireResult(id, cached.ACL, nil)
|
c.fireResult(id, cached.ACL, nil)
|
||||||
return
|
return
|
||||||
|
|
|
@ -379,8 +379,7 @@ func (c *Config) CheckACL() error {
|
||||||
switch c.ACLDownPolicy {
|
switch c.ACLDownPolicy {
|
||||||
case "allow":
|
case "allow":
|
||||||
case "deny":
|
case "deny":
|
||||||
case "async-cache":
|
case "async-cache", "extend-cache":
|
||||||
case "extend-cache":
|
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("Unsupported down ACL policy: %s", c.ACLDownPolicy)
|
return fmt.Errorf("Unsupported down ACL policy: %s", c.ACLDownPolicy)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue