@malloy-publisher/server 0.0.247 → 0.0.248

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3530,14 +3530,21 @@ components:
3530
3530
  authorize:
3531
3531
  type: array
3532
3532
  description: >-
3533
- Effective authorize expressions gating this source via `#(authorize)`
3534
- / `##(authorize)` annotationsfile-level expressions first, then the
3535
- source's own, or, when it declares none, the nearest source it extends
3536
- that does. Each is a Malloy boolean expression over declared givens,
3537
- evaluated as a disjunction (OR) and enforced at query time. A request
3538
- that reads this source is denied with HTTP 403 unless at least one
3539
- expression evaluates true for the supplied givens; an empty or absent
3540
- list means unrestricted.
3533
+ Effective authorize expressions gating this source, declared with a
3534
+ source-level `#(authorize)` annotationthe source's own, or, when it
3535
+ declares none, the nearest source it extends that does. (File-level
3536
+ `##(authorize)` is deprecated and fails the model load, so no
3537
+ expression here ever comes from one.) Each is a Malloy boolean
3538
+ expression over declared givens, evaluated as a disjunction (OR) and
3539
+ enforced at query time. An empty or absent list means unrestricted.
3540
+
3541
+ How a denial surfaces depends on what the expression reads. An
3542
+ expression referencing only givens is a whole-source gate: the request
3543
+ is denied with HTTP 403 unless at least one expression evaluates true.
3544
+ An expression that also references a row field of the source is a
3545
+ row-level gate, applied as a filter instead — such a request succeeds
3546
+ with HTTP 200 and returns only the rows the expression admits, which
3547
+ may be none. Do not treat a 200 with zero rows as "no gate applied".
3541
3548
 
3542
3549
  IMPORTANT for anything re-implementing the decision: this flat list
3543
3550
  cannot always express the predicate. Expressions from one source are