Repository navigation
fix(contacts): accept a contact person only from someone who may add members to its organisation (REVIEW) - #1425
Merged
Conversation
…members to its organisation Assisted-by: ClaudeCode:claude-opus-5-5
…tic calls Assisted-by: ClaudeCode:claude-opus-5-5
…rson-organisation-guard
…only skip stackiq's own writes Assisted-by: ClaudeCode:claude-opus-5-5
Contributor
Quality Report — ConductionNL/stackiq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| check-vue-demi | ✅ | ||||
| test-l10n | ✅ | ||||
| format | ✅ | ||||
| check-schema-l10n | ❌ | ||||
| check-l10n-js | ✅ | ||||
| composer | ✅ | ✅ 127/127 | |||
| npm | ❌ | ✅ 807/807 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| lockfile sync | ✅ | ||||
| PHPUnit | ✅ 1805/1805 | ||||
| Newman | ⏭️ | ||||
| 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-04 15:01 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.
REVIEW (contacts). Held for the reviewer.
What changes
A contact person is turned into an account in its organisation by the contact sync, and an existing account named by its e-mail address gets its role group reset. This PR checks who writes the contact person, before OpenRegister saves it:
ContactPersonOrganisationListeneron OpenRegister's creating and updating events, for the contact person schema only. It refuses the write with a generic message unlessContactPersonOrganisationGuardallows it.gebruik-beheerderoraanbod-beheerder(the same groups the convert-to-user endpoint accepts). A contact person may name an existing account other than the caller's own only when that account already belongs to the organisation.occ, cron, the sync itself) are not checked.openspec/specs/contactpersoon-sync/spec.md.ObjectUpdatingEventcopied from development, andhasUser()on the organisation stub.Contacts that were saved before this change are not re-checked.
How it was verified
ContactPersonOrganisationListenerTest: 18 tests with the real guard. On development they fail (the listener is not there and not registered).organizationkey ignored, modified data ignored, no stop, command line checked, updating event ignored, schema ignored, not registered): all killed; the no-op control survives.--fail-on-riskyon ff47e1a: 1768 tests, 8 skipped, exit 0. The later commit only reshapes the two new classes; their tests re-ran green.--scope-to-diff --base origin/development): 41 of 41 applicable gates ran, exit 0. Gate 122 ratchet on the final commit: 0 findings, 1 inherited (Application::registerDomainServicessize).Review fixes
organisation,organization,email,e-mailadres) on its own, refuses a contact whose two organisation keys or two e-mail keys disagree, and re-checks an update when any of them orusernamechanges. Values are trimmed and compared case-insensitively.usernamemay name only the caller's own account, unless the caller is an administrator. A member may still change the e-mail address of their own contact in the same organisation.emailfirst, the same key the contact sync uses as the account name.SystemContactWrites, which the contact sync job and the contact migration repair step use.--fail-on-riskyon eb8c1e8: 1805 tests, exit 0. phpcs, phpmd, phpstan, psalm: exit 0. Hydra gates (--scope-to-diff): 42 of 42 applicable ran, exit 0. Gate 122 ratchet: 0 new findings.Assisted-by: ClaudeCode:claude-opus-5-5