| @objectstack/objectql | patch |
|---|
Enforce per-option visibleWhen on checkboxes fields, and match option values by string form (objectui#2729). Server-side per-option gating already covered select / multiselect / radio, but two holes let gated values through on write:
checkboxeswas not enforced.CHOICE_FIELD_TYPESomittedcheckboxes, so a gatedcheckboxesoption (whose client widget cascades identically tomultiselectsince objectui#2715) was hidden in the UI but accepted from a crafted write. Addedcheckboxesto the enforced set — its picked values are now re-evaluated against each option'svisibleWhen(record +current_user) on insert/update/bulk-update, element-wise, likemultiselect.- Numeric option values could slip the gate. Option matching used strict
===, but the enum-membership validator compares byString(...). A numeric option value submitted as a string (a normal REST/JSON round-trip) passed the enum check yet missed itsvisibleWhengate (fail-open). Matching now coerces both sides withString(...), so the two validators agree on which option a written value denotes.
Behavior for select / multiselect / radio is unchanged. Fail-open on unbound current_user / unevaluable predicates is preserved.