mirror of
https://github.com/niusmallnan/steve.git
synced 2025-07-08 12:08:43 +00:00
Fix broken create.
This commit is contained in:
parent
4c61f95a6a
commit
5c768508bb
@ -49,6 +49,8 @@ type rbacPartitioner struct {
|
|||||||
|
|
||||||
func (p *rbacPartitioner) Lookup(apiOp *types.APIRequest, schema *types.APISchema, verb, id string) (partition.Partition, error) {
|
func (p *rbacPartitioner) Lookup(apiOp *types.APIRequest, schema *types.APISchema, verb, id string) (partition.Partition, error) {
|
||||||
switch verb {
|
switch verb {
|
||||||
|
case "create":
|
||||||
|
fallthrough
|
||||||
case "get":
|
case "get":
|
||||||
fallthrough
|
fallthrough
|
||||||
case "update":
|
case "update":
|
||||||
@ -56,7 +58,7 @@ func (p *rbacPartitioner) Lookup(apiOp *types.APIRequest, schema *types.APISchem
|
|||||||
case "delete":
|
case "delete":
|
||||||
return passthroughPartitions[0], nil
|
return passthroughPartitions[0], nil
|
||||||
default:
|
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
|
return partitions, nil
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("invalid verb %s", verb)
|
return nil, fmt.Errorf("parition all: invalid verb %s", verb)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user