Repository navigation
fix(marketing): the public intakes write the contact, client and lead as the system account - #2503
Open
rubenvdlinde wants to merge 7 commits into
Open
rubenvdlinde wants to merge 7 commits into
rubenvdlinde wants to merge 7 commits into
Conversation
…account (tests to follow)
…itten as the system account with access checks on
…ient to their own helpers (phpmd)
…are not readOnly, so OpenRegister imports contact and client CI's import refused both schemas: 'serverSet' is not a top-level property key. readOnly would also have refused the touch write on every existing contact; firstTouch is immutable instead, both are hidden in forms.
…ystem account with access checks on, refusals and fallbacks
…ad as the system account, access checks on SubmittedLeadIntake and LandingPageFormSubmittedListener took ListObjectStore, which runs with _rbac false. They now take SystemObjectStore: every find and save runs as pipelinq-system through SystemServiceAccount::runAsSystem with OpenRegister's access checks on, and the register's authorization block (which grants user:pipelinq-system on contact, client and lead) decides.
rubenvdlinde
requested review from
Rem-Dam,
SudoThijn,
WilcoLouwerse,
bbrands02,
remko48 and
rjzondervan
as code owners
October 15, 2026 18:21
Contributor
Quality Report — ConductionNL/pipelinq @
|
| 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 | ✅ | ||||
| check-e2e-nav | ✅ | ||||
| check-lib-link | ✅ | ||||
| composer | ❌ | ✅ 109/109 | |||
| npm | ✅ | ✅ 747/747 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| lockfile sync | ✅ | ||||
| PHPUnit | ✅ 3745/3745 · 9 skipped | ||||
| Newman | ✅ 66/66 | ||||
| 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-10-15 18:53 UTC
Download the full PDF report from the workflow artifacts.
This branch has not been deployed
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.
Both public intakes, the web form lead (
SubmittedLeadIntake, run fromSubmittedLeadListener) and the landing page submission (LandingPageFormSubmittedListener), found and created the contact, the client and the lead throughListObjectStore, which calls OpenRegister with_rbac: false. They now takeSystemObjectStore: every find and save runs aspipelinq-systemthroughSystemServiceAccount::runAsSystem()with OpenRegister's access checks on. The register's authorization block already grantsuser:pipelinq-systemread, create and update oncontact,clientandlead(99-zzz-register-access.json), so nothing in the register changes.Stacked on #2498 (it introduces
SystemObjectStore). Land #2498 first; this PR's own diff is the last commit, 8913d60.Tests:
LandingPageFormSubmittedListenerTest::testTheVisitorsRecordsAreWrittenAsTheSystemAccount: an anonymous visitor's submission with an organisation writes client, contact, lead, touchpoint and the contact's touches, every call as pipelinq-system with_rbacon, and the visitor is anonymous again afterwards.SubmittedLeadIntakeTest::testThePartiesAreWrittenAsTheSystemAccount: the web form lead's contact and client, the same.SubmittedLeadIntakeTest::testNoPublicIntakeWritesWithAccessChecksOff: neither intake's source holds_rbac: falseorListObjectStore.BuildsSystemObjectStorenow records the user each call ran as, and its fake OpenRegister still refuses any call with_rbac: false.git grep -n "_rbac" -- lib/Service/Marketing/SubmittedLeadIntake.php lib/Listener/LandingPageFormSubmittedListener.phpfinds nothing (exit 1); the same forListObjectStore.Still
_rbac: falseon this path, both READS, not changed here: the nonce guardTouchpointService::existsForNonce()and the campaign lookupCampaignService::find(), both overListObjectStore. Moving them is a follow-up if you want the whole path on the system account.Found while testing, not changed: a landing page submission creates the client but does not link the new contact to it, so
recordSubmissiontouches the contact and not the client on that path (the web form path does link them).Spec: REQ-MOC-004 in
marketing-campaign-on-clientnow names the intakes' contact, client and lead writes, with a scenario for an anonymous visitor; task 1.7 added and ticked.Checks at 8913d60: lint 0, phpcs 0, phpmd 0, psalm 0, phpstan 0, PHPUnit 0 (3754). PHP only, so npm and vitest were not rerun; the Hydra gates were not rerun for this commit (#2498's run is 10 failed, all inherited).