mirror of
https://github.com/rancher/norman.git
synced 2025-09-19 18:16:15 +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 {
|
||||
buffer := &bytes.Buffer{}
|
||||
|
||||
apiContext.ExpireAccessControl(schema)
|
||||
if err := jsonWriter.VersionBody(apiContext, &schema.Version, buffer, item); err != nil {
|
||||
cancel()
|
||||
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{} {
|
||||
apiContext.ExpireAccessControl(schema)
|
||||
return apiContext.AccessControl.Filter(apiContext, schema, data, s.authContext)
|
||||
}), nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user