feat(channels): P4 community submission loop - #2157
Merged
Merged
Conversation
…ly, server-stamped) - srv/channel-submission-service.cds: @path '/channel-submissions', @requires 'authenticated-user', @insertonly Submissions projection on ims.ChannelSubmissions - srv/channel-submission-service.js: before('CREATE') stamps submitterId=req.user.id, forces status='PENDING', nulls reviewerId/reviewNote - test/channel-submission-service.test.js: 3 tests (anon 401, stamped fields via DB SELECT, read blocked) CAP 10 returns 204 No Content for @insertonly creates (no SELECT round-trip); test verifies stamped fields via direct DB SELECT to match model-test patterns.
…ve/reject actions
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.
P4 — Community submission loop (final phase of external-channels)
Logged-in users propose channel ADD / EDIT / REMOVE via a Vue island; admins moderate in a Fiori Elements queue that applies approve/reject to
Channels.What's included (8 tasks, TDD + per-task review + whole-branch review)
ChannelSubmissionsentity (db/channels.cds) +@cds.persistence.journal(db/persistence.cds) + machine-generated.hdbmigrationtable(version=1, zero hand-edit).@requires:'authenticated-user',@insertonly;before('CREATE')stamps server-controlled fields (submitterId/status/reviewerId/reviewNote) so a client can't spoof them.DataFieldForActionannotations (bound FQN form, mirroringContentModerationService).Channels; PROPOSABLE field whitelist drops non-proposable keys; HANA-safe INSERT (ID: cds.utils.uuid()); 404 on unknown ID, 400 on non-PENDING.^/channel-submissions/(.*)$→ srv-api, xsuaa, default CSRF-on.channel-submitVue island — auth probe (JSON +authenticated, never bareres.ok) +csrfFetchPOST; handles CAP 10 204 No Content (never reads POST body).channel-submissions, prefixcsub).SMOKE_BASE_URL.Verification
contentHash/sourceId; no secrets; noreq.userwithout@requires.db/last-dev/csn.json+.hdbmigrationtableare the T1-paired machine-generated artifacts (a stray reserialization was discarded).