mirror of
https://github.com/rancher/norman.git
synced 2025-09-20 18:49:12 +00:00
Expire RBAC cache earlier on watches
This commit is contained in:
@@ -113,7 +113,6 @@ func handler(apiContext *types.APIContext) error {
|
|||||||
if schema != nil {
|
if schema != nil {
|
||||||
buffer := &bytes.Buffer{}
|
buffer := &bytes.Buffer{}
|
||||||
|
|
||||||
apiContext.ExpireAccessControl(schema)
|
|
||||||
if err := jsonWriter.VersionBody(apiContext, &schema.Version, buffer, item); err != nil {
|
if err := jsonWriter.VersionBody(apiContext, &schema.Version, buffer, item); err != nil {
|
||||||
cancel()
|
cancel()
|
||||||
continue
|
continue
|
||||||
|
@@ -271,6 +271,7 @@ func (s *Store) Watch(apiContext *types.APIContext, schema *types.Schema, opt *t
|
|||||||
}
|
}
|
||||||
|
|
||||||
return convert.Chan(c, func(data map[string]interface{}) map[string]interface{} {
|
return convert.Chan(c, func(data map[string]interface{}) map[string]interface{} {
|
||||||
|
apiContext.ExpireAccessControl(schema)
|
||||||
return apiContext.AccessControl.Filter(apiContext, schema, data, s.authContext)
|
return apiContext.AccessControl.Filter(apiContext, schema, data, s.authContext)
|
||||||
}), nil
|
}), nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user