Updated swith case to use same branch for async-cache and extend-cache

This commit is contained in:
Pierre Souchay 2018-07-02 17:39:34 +02:00
parent f675575b66
commit 95a0ab9f99
3 changed files with 3 additions and 6 deletions

View File

@ -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)

View File

@ -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

View File

@ -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)
}