PubliclyUpdatable
in package
Column that anyone, even without the `updateColumns` privilege, may write via `updateColumns`.
Generic updateColumns stays admin-only, yet the front end sets a few flags (such as "report")
that any visitor may change; the exception sits on the column. Counters do not belong here:
they go through registerEvent, which adds 1 on the server.
SaveTrait::internalActionUpdateColumns() checks the privilege
first, then each column for this attribute or ConditionallyUpdatable. A single column
without either fails the whole call and the error names it.
IMPORTANT: the attribute applies to the internal bridge and external HTTP alike and does not check record ownership. Anyone with a valid token may change the column as often as they like, so never use it for values or order states.
Usage:
#[PubliclyUpdatable]
protected bool $reported = false;
Tags
Attributes
- #[Attribute]
- \Attribute::TARGET_PROPERTY