Skip to content

Run UA scope validation earlier than before execute #2228

@mvorisek

Description

@mvorisek

Steps to reproduce:

  1. remove the ID args at https://github.com/atk4/ui/blob/5.2.0/demos/data-action/jsactions2.php#L46
  2. open https://ui.atk4.org/demos/data-action/jsactions2.php#L46 and notice "preview" emits Atk4\Data\Exception: User action can be executed on loaded entity only

The same exception is expected immediatelly for "delete" (ie. before confirmation) and for "edit" (ie. before modal is displayed and saved).

The validation is currently done in UA before execute/preview only in https://github.com/atk4/data/blob/5.2.0/src/Model/UserAction.php#L186.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions