docs: document allow_all in the row_level access policy reference - #11907
igorlukanin wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
|
Claude finished @igorlukanin's task in 1m 45s —— View job Docs-only change, accurate against the validator — 0 high, 0 medium, 2 lowReview details
Verified claims
The reference was genuinely the last place FindingsBoth low, both posted inline:
No correctness, security, performance, or test-coverage concerns — the change touches only Review threadsThe thread listing returned 0 of my own threads (no prior threads). None resolved, none re-affirmed. |
| | Parameter | Description | | ||
| | --- | --- | | ||
| | `filters` | The filters that apply to result set rows. The policy grants the rows that match them. | | ||
| | `allow_all` | Set it to `true` to grant every row. The policy applies no row restriction. | |
There was a problem hiding this comment.
allow_all: false is rejected, not a no-op, and the row doesn't say so. packages/cubejs-schema-compiler/src/compiler/CubeValidator.ts:1134 accepts only the literal true:
allowAll: Joi.boolean().valid(true).strict(),So a reader who writes allow_all: false (say, to template the flag off a variable, or to spell out "this policy does restrict rows") gets a model validation error rather than a policy that falls through to filters — and filters can't be present alongside it either, because of the xor. Worth one clause in the row.
| | `allow_all` | Set it to `true` to grant every row. The policy applies no row restriction. | | |
| | `allow_all` | Set it to `true` to grant every row. The policy applies no row restriction. `false` is not accepted. | |
| [boolean logical operators][ref-rest-boolean-ops]. | ||
|
|
||
| In the following example, users in the `auditor` group can access every row. | ||
| Combining `allow_all` with `filters` in one `row_level` is an error. |
There was a problem hiding this comment.
The exclusivity rule is stated twice — line 423 already says "Set exactly one of these parameters", and docs-mintlify/CLAUDE.md asks to say it once. It also reads oddly as the second sentence of an example intro, where the example itself shows nothing about combining the two.
| Combining `allow_all` with `filters` in one `row_level` is an error. | |
| In the following example, users in the `auditor` group can access every row. |
The
row_levelreference documented onlyfilters, so a reader could not learn thatallow_allexists. It is the documented way to write a policy that spans every row, andRowLevelPolicySchemaaccepts exactly one of the two.Adds
allow_allto the parameter list with a YAML and a JavaScript example, and states that setting both is an error. The concepts page already mentionsallow_all; this brings the reference in line with it.