1
0
mirror of https://github.com/rancher/norman.git synced 2025-09-01 15:18:20 +00:00

Don't check for object in collection actions

This commit is contained in:
Darren Shepherd
2018-01-17 16:33:30 -07:00
parent 942bde06d7
commit d4e7ad28b8

View File

@@ -222,8 +222,10 @@ func (s *Server) handle(rw http.ResponseWriter, req *http.Request) (*types.APICo
}
func handleAction(action *types.Action, context *types.APIContext) error {
if err := access.ByID(context, context.Version, context.Type, context.ID, nil); err != nil {
return err
if context.ID != "" {
if err := access.ByID(context, context.Version, context.Type, context.ID, nil); err != nil {
return err
}
}
return context.Schema.ActionHandler(context.Action, action, context)
}