mirror of
https://github.com/rancher/norman.git
synced 2025-09-09 02:59:19 +00:00
Put in stubs for dynamic access control on schemas
This commit is contained in:
@@ -18,11 +18,11 @@ func (*AllAccess) CanList(apiContext *types.APIContext, schema *types.Schema) bo
|
||||
return slice.ContainsString(schema.CollectionMethods, http.MethodGet)
|
||||
}
|
||||
|
||||
func (*AllAccess) CanUpdate(apiContext *types.APIContext, schema *types.Schema) bool {
|
||||
func (*AllAccess) CanUpdate(apiContext *types.APIContext, obj map[string]interface{}, schema *types.Schema) bool {
|
||||
return slice.ContainsString(schema.ResourceMethods, http.MethodPut)
|
||||
}
|
||||
|
||||
func (*AllAccess) CanDelete(apiContext *types.APIContext, schema *types.Schema) bool {
|
||||
func (*AllAccess) CanDelete(apiContext *types.APIContext, obj map[string]interface{}, schema *types.Schema) bool {
|
||||
return slice.ContainsString(schema.ResourceMethods, http.MethodDelete)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user