Run UA scope validation earlier than before execute
mvorisek opened this issue · 0 comments
mvorisek commented
Steps to reproduce:
- remove the ID args at https://github.com/atk4/ui/blob/5.2.0/demos/data-action/jsactions2.php#L46
- 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.