1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-07 02:10:30 +00:00

Full dynamic RBAC and pagination

This commit is contained in:
Darren Shepherd
2020-02-10 10:18:20 -07:00
parent 12df5d1a3d
commit e64845dcb9
18 changed files with 656 additions and 36 deletions

View File

@@ -17,8 +17,8 @@ func NewAccessControl() *AccessControl {
func (a *AccessControl) CanWatch(apiOp *types.APIRequest, schema *types.APISchema) error {
access := GetAccessListMap(schema)
if !access.Grants("watch", "*", "*") {
return fmt.Errorf("watch not allowed")
if _, ok := access["watch"]; ok {
return nil
}
return nil
return fmt.Errorf("watch not allowed")
}