From 5c768508bb1b692827f57a49c5c4e339538db6e7 Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Fri, 12 Jun 2020 14:18:13 -0700 Subject: [PATCH] Fix broken create. --- pkg/stores/proxy/rbac_store.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/stores/proxy/rbac_store.go b/pkg/stores/proxy/rbac_store.go index dad1a87..679bacd 100644 --- a/pkg/stores/proxy/rbac_store.go +++ b/pkg/stores/proxy/rbac_store.go @@ -49,6 +49,8 @@ type rbacPartitioner struct { func (p *rbacPartitioner) Lookup(apiOp *types.APIRequest, schema *types.APISchema, verb, id string) (partition.Partition, error) { switch verb { + case "create": + fallthrough case "get": fallthrough case "update": @@ -56,7 +58,7 @@ func (p *rbacPartitioner) Lookup(apiOp *types.APIRequest, schema *types.APISchem case "delete": return passthroughPartitions[0], nil default: - return nil, fmt.Errorf("invalid verb %s", verb) + return nil, fmt.Errorf("partition list: invalid verb %s", verb) } } @@ -74,7 +76,7 @@ func (p *rbacPartitioner) All(apiOp *types.APIRequest, schema *types.APISchema, }) return partitions, nil default: - return nil, fmt.Errorf("invalid verb %s", verb) + return nil, fmt.Errorf("parition all: invalid verb %s", verb) } }