1
0
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:
Darren Shepherd
2020-03-21 16:02:42 -07:00
parent 586aa558be
commit b2d111fe7f
2 changed files with 1 additions and 1 deletions

View File

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

View File

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