Skip to content

Withhold owner feedback from share-link viewers#879

Open
bdart wants to merge 1 commit into
feature/ermain-486-narrow-share-link-access-to-the-dedicated-shared-route-stopfrom
feature/ermain-489-after-ermain-486-verify-share-link-viewers-can-no-longer
Open

Withhold owner feedback from share-link viewers#879
bdart wants to merge 1 commit into
feature/ermain-486-narrow-share-link-access-to-the-dedicated-shared-route-stopfrom
feature/ermain-489-after-ermain-486-verify-share-link-viewers-can-no-longer

Conversation

@bdart

@bdart bdart commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #878 (ERMAIN-486). After 486 removes the share-link Chat::Read grant, a viewer can no longer write feedback — but the dedicated share-link route still embedded the owner's feedback in its response, because it reuses assemble_chat_messages_response, which fetched feedback unconditionally. That read-exposure is independent of the rego change and is what this PR closes.

Change

  • Thread include_feedback through assemble_chat_messages_response: the owner route passes true, the share-link route passes false. A share-link viewer never receives the owner's 👍/👎 or free-text comment.
  • Integration test (extends test_chat_share_link_enable_disable_flow):
    • owner leaves feedback and sees it on their own view — positive control, so the assertion below is not vacuous;
    • the share-link view returns feedback: null for that message;
    • the viewer's PUT /messages/{id}/feedback is denied (403) — the write-denial that 486 enables;
    • the viewer's DELETE /messages/{id}/feedback is denied (403) — retraction (ERMAIN-488 / Allow users to retract message feedback #865, now on base) gates on Chat::Read too.

The read-scope fix here is independent of 486 and could land on its own, but it's kept in the stack to land together.

Stacks on #878; part of the 485 → 486 → 489 set meant to land together.

Closes ERMAIN-489.

Validated locally: the extended integration test is green against Postgres.

@bdart
bdart force-pushed the feature/ermain-486-narrow-share-link-access-to-the-dedicated-shared-route-stop branch from e71a2d0 to 72c89bd Compare July 24, 2026 15:46
@bdart
bdart force-pushed the feature/ermain-489-after-ermain-486-verify-share-link-viewers-can-no-longer branch from 6c15df8 to 2091d3f Compare July 24, 2026 15:46
@bdart
bdart force-pushed the feature/ermain-486-narrow-share-link-access-to-the-dedicated-shared-route-stop branch from 72c89bd to cdb44a9 Compare July 24, 2026 17:39
@bdart
bdart force-pushed the feature/ermain-489-after-ermain-486-verify-share-link-viewers-can-no-longer branch from 2091d3f to 74b670e Compare July 24, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant