Updated swith case to use same branch for async-cache and extend-cache
This commit is contained in:
parent
f675575b66
commit
95a0ab9f99
|
@ -103,8 +103,7 @@ func newACLManager(config *config.RuntimeConfig) (*aclManager, error) {
|
|||
down = acl.AllowAll()
|
||||
case "deny":
|
||||
down = acl.DenyAll()
|
||||
case "extend-cache":
|
||||
case "async-cache":
|
||||
case "async-cache", "extend-cache":
|
||||
// Leave the down policy as nil to signal this.
|
||||
default:
|
||||
return nil, fmt.Errorf("invalid ACL down policy %q", config.ACLDownPolicy)
|
||||
|
|
|
@ -277,8 +277,7 @@ ACL_DOWN:
|
|||
case "allow":
|
||||
c.fireResult(id, acl.AllowAll(), nil)
|
||||
return
|
||||
case "async-cache":
|
||||
case "extend-cache":
|
||||
case "async-cache", "extend-cache":
|
||||
if cached != nil {
|
||||
c.fireResult(id, cached.ACL, nil)
|
||||
return
|
||||
|
|
|
@ -379,8 +379,7 @@ func (c *Config) CheckACL() error {
|
|||
switch c.ACLDownPolicy {
|
||||
case "allow":
|
||||
case "deny":
|
||||
case "async-cache":
|
||||
case "extend-cache":
|
||||
case "async-cache", "extend-cache":
|
||||
default:
|
||||
return fmt.Errorf("Unsupported down ACL policy: %s", c.ACLDownPolicy)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue