test(e2e): un-skip versionRouting 9.2; record the measured blockers on the RBAC suite - #84
Merged
Merged
Conversation
Every openbuild schema declared
"authorization": { "create": ["admin"], "update": ["admin"], "delete": ["admin"] }
— non-empty, and with no `read` key. OpenRegister treats that as fail-closed:
`MagicRbacHandler::buildRbacConditionsSql()` bypasses filtering only for an
EMPTY block; a populated block with no `read` rule falls through to the owner
condition alone, so every non-admin caller saw zero rows. Not a bug in OR —
deliberate, and commented as such at MagicRbacHandler:1031.
That is the whole of #76. An owner could grant a colleague editor or viewer on
an app and they still saw an empty list, because OR filtered the objects out
one layer below openbuild's own permission check.
Adds `"read": ["authenticated"]` to all 15 schemas — 6 in the monolith and 9
across the register.d fragments, which were missed by the first pass and would
have left business rules, automations, component blocks and the agent
workspace owner-only.
`authenticated` requires $userId !== null (MagicRbacHandler:414), so anonymous
callers are NOT granted. This is intentionally the coarse layer: appinfo/routes.php
already documents that OR's schema read rule is a group ACL, not a row filter,
and that the per-app `permissions` block is enforced by /api/applications. Both
layers verified live.
Measured on the disposable instance after a FORCED re-import:
caller OR object API openbuild /api/applications
admin 21 21
rbac-editor 0 -> 21 1 (granted editor on pw-verchain)
rbac-viewer 0 -> 21 1 (granted viewer on pw-verchain)
rbac-outsider 0 -> 21 0 (no grant)
anonymous 0 401
Diagnosis trail: ConductionNL/openregister#2252.
…s on the RBAC suite
9.2 — ENABLED, four scenarios replacing one that asserted almost nothing.
Two things unblocked it. globalSetup now provisions the rbac-* fixture users
and mints one storageState each, so no spec form-logs-in (four consecutive
logins is exactly what trips Nextcloud's brute-force throttle) — `loginAs` is
gone from this file. And openbuild#76: until every schema carried a `read`
rule, non-admins saw ZERO objects, so "viewer gets 404" passed for the wrong
reason and no 200 assertion was reachable at all.
The old body could not fail meaningfully. It located the schema list with
`.ob-schema-list` / `[data-testid="schema-list"]`, neither of which exists in
src/, so "must NOT be visible" held on any page including a correct one; and it
downgraded a missing not-found UI to a console.warn. Now asserted:
- viewer + staging -> 404 with the body pinned EXACTLY, plus a regex check
that the envelope names no authorisation reason
- non-member + staging -> byte-identical to the viewer's, and identical again
to an unknown version slug (that indistinguishability IS REQ-OBVR-003)
- editor + staging -> 200 with a manifest. The positive control: without it a
broken fixture, a missing chain or a blanket denial all look like a pass
- viewer UI -> `.openbuild-schema-list` (the REAL selector) absent, no stack trace
Setup grants the roles via grantAppRoles(), which had been merged with no
caller — so the editor control now actually exercises an editor.
schema-access-scopes-rbac — STAYS SKIPPED, with honest blockers.
Its three recorded blockers are all resolved (fixture users exist; the version
chain is seeded; the feature and its copy are real — the warning is an
NcNoteCard sibling of .openbuild-access-editor, and `.note-stub` never existed).
A fourth, found by driving it rather than reading it, is not: the schema
designer is unreachable for a non-admin. rbac-editor lands on the first-time
setup wizard with `.openbuild-schema-list` count 0, because /api/setup/status is
admin-only and useSetupStatus read its 403 as "nothing done". Fixed upstream in
ConductionNL/nextcloud-vue#574; unblocks on a published bump.
The comment also records a defect found while measuring, filed as #83:
availableGroups feeds the dropdown `group:`-prefixed values while
authorLockedOut compares bare gids, so the lock-out warning fires for members
too — exactly the REQ-OBDSA-004 scenario. Noted so this suite is not simply
un-skipped and declared green once the wizard blocker lifts.
Contributor
Quality Report — ConductionNL/openbuild @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 100/100 | |||
| npm | ✅ | ✅ 659/659 | |||
| PHPUnit | ✅ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
Coverage: 89.4% (17/19 statements)
Quality workflow — 2026-08-01 21:55 UTC
Download the full PDF report from the workflow artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #81 (the OpenRegister read grant), which is what made these assertions reachable.
9.2 — enabled, four scenarios replacing one that asserted almost nothing
Two things unblocked it:
globalSetupprovisionsrbac-owner/-editor/-viewer/-outsiderand mints one storageState each, so no spec form-logs-in — four consecutive logins is exactly what trips Nextcloud's brute-force throttle.loginAsis gone from this file.readrule, non-admins saw zero objects. "Viewer gets 404" passed for the wrong reason, and no 200 assertion was reachable at all.The old body could not fail meaningfully: it located the schema list with
.ob-schema-list/[data-testid="schema-list"], neither of which exists insrc/, so "must NOT be visible" held on any page — including a correct one — and it downgraded a missing not-found UI to aconsole.warn.Now asserted:
stagingstagingstaging.openbuild-schema-list(the real selector) absent, no stack traceThe editor row matters most: without it, a broken fixture, a missing version chain and a blanket denial all look identical to a pass. Setup grants the roles via
grantAppRoles(), which had been merged with no caller — so the control now exercises a genuine editor.schema-access-scopes-rbac — stays skipped, with honest blockers
All three recorded blockers are resolved: the fixture users exist (and map naturally onto "editor in the selected group" vs "editor not in it" — no
vetsgroup, no Newman needed); the version chain is seeded; and the feature is real — the warning is anNcNoteCardsibling of.openbuild-access-editor, with the copy inSchemaDesigner.vue..note-stubnever existed.A fourth blocker, found by driving it rather than reading it, is not resolved: the schema designer is unreachable for a non-admin.
rbac-editorlands on the first-time setup wizard with.openbuild-schema-listcount 0, because/api/setup/statusis admin-only anduseSetupStatusread its 403 as "nothing done". Fixed upstream in ConductionNL/nextcloud-vue#574 (merged); unblocks on a published bump.The comment also records #83, found while measuring:
availableGroupsfeeds the dropdowngroup:-prefixed values whileauthorLockedOutcompares bare gids, so the lock-out warning fires for members too — precisely the REQ-OBDSA-004 scenario. Noted so this suite is not simply un-skipped and declared green once the wizard blocker lifts.Verification
versionRouting.spec.ts— 6 passed against the disposable instance (3.6m), including all four new 9.2 scenarios. Full-suite result reported in a comment below.🤖 Generated with Claude Code