Repository navigation
[access] refactor(object): SaveObject private save steps take fewer parameters - #7637
Merged
Merged
Conversation
… them Pins the shared master data guard (which register and schema it asks about, the audit row and log line a refusal leaves), the read-only object-source rejection that follows an allowed guard, and the existing-object lookup of a save (no RBAC or multitenancy; free object returned; locked, archived and frozen objects refused). Driven through private entry points whose signatures do not change. Assisted-by: ClaudeCode:claude-opus-5-5
- prepareObjectForCreation (8 -> 4): takes an ObjectPayload (data and @self) and the save's ObjectSaveFlags; the unused multitenancy flag is dropped. - prepareObjectForUpdate (5 -> 4): takes an ObjectPayload. - recordSharedMasterDataRefusal (5 -> 3) and refuseSharedMasterDataWrite take an ObjectWriteTarget (register id, schema id, uuid). - delegateObjectSourceWrite (6 -> 2): takes the save call and the annotation. - findAndValidateExistingObject (5 -> 3): its one caller always passed _rbac and _multitenancy false; the lookup now passes false itself, with the reason beside it. The access golden committed before this change passes unchanged. Assisted-by: ClaudeCode:claude-opus-5-5
Contributor
Author
|
The red Newman API Test Suite check does not come from this PR. The PHPUnit step inside the Nextcloud container fails with 11 errors and 11 failures. None of them are in files this diff touches. The failing tests are:
The same set fails on unrelated open PRs #7541, #7543, #7538, #7540, #7575 and #7594. Outside the container these tests pass on plain The tests this PR changes pass in the same run. These include the new Generated by Claude Code |
Contributor
Quality Report — ConductionNL/openregister @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ❌ | ||||
| phpmd | ❌ | ||||
| psalm | ❌ | ||||
| phpstan | ❌ | ||||
| phpmetrics | ✅ | ||||
| eslint | ❌ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-specs | ✅ | ||||
| test-l10n | ❌ | ||||
| test-l10n-parity | ❌ | ||||
| format | ❌ | ||||
| check-schema-l10n | ✅ | ||||
| test-coverage-ratchet | ✅ | ||||
| composer | ✅ | ✅ 168/168 | |||
| npm | ✅ | ✅ 641/641 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ✅ | ||||
| lockfile sync | ✅ | ||||
| PHPUnit | ❌ 49106/49116 · 19 skipped | ||||
| Newman | ❌ 1625/1628 | ||||
| Playwright | ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development. |
||||
| Hydra gates | ❌ |
Quality workflow — 2026-11-09 23:49 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.
Lane K17 (round 10c), SIG unit interfacing: the private save steps of
SaveObject.What changed
prepareObjectForCreation(8 → 4 params): takesObjectPayload(data +@self) and the save'sObjectSaveFlags(acting user, unowned, explicit owner). The_multitenancyparameter was never read in the body, so it is dropped.prepareObjectForUpdate(5 → 4): takesObjectPayload. Both of its callers (the save path andupdateObject's persist step) build the payload.recordSharedMasterDataRefusal(5 → 3) andrefuseSharedMasterDataWritetakeObjectWriteTarget(register id, schema id, uuid). The target is built in the non-strict SaveObject file, so the int coercion of the ids is the same as before.delegateObjectSourceWrite(6 → 2): takes the save call and the object-source annotation.findAndValidateExistingObject(5 → 3): its one caller always passed_rbac: false, _multitenancy: false. The lookup now passesfalseto the mapper itself, with the reason kept beside it, so the values reaching the mapper are unchanged.lib/Service/Object/SaveObject/:ObjectPayload(used by create and update preparation) andObjectWriteTarget(used by the guard and its recorder).Access
SaveObjectAccessPathsGoldenTest, written and run against the old code. It pins the shared master data guard (the register/schema ids it asks, the audit row and log line of a refusal), the read-only object-source rejection after an allowed guard, and the existing-object lookup: no RBAC or multitenancy; a free object is returned; another row or no row means a create; locked, archived and frozen objects are refused. It passes unchanged after the refactor._rbac: trueto the lookup.Tests
Numbers (lane_measure K17, this branch alone)
Not changed, and why
saveObject(15 params) is declared bySaveObjectWriterInterface, which is outside this lane. Its main caller,ObjectService::persistObject, is held by an open PR.updateObjectis called fromObjectService, which is in open fix(delete): permanent delete now dispatches ObjectDeletedEvent #5497.AI-assisted: written by Claude Code (Claude) for lane K17.
Generated by Claude Code