test(audit): add cross-user scoping regression for youParticipated
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -230,6 +230,21 @@ class AuditLogQueryRepositoryRolledUpTest {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void youParticipated_is_false_when_reply_notification_belongs_to_other_user() {
|
||||||
|
insertUserAndDocs();
|
||||||
|
UUID commentId = UUID.randomUUID();
|
||||||
|
insertAuditEvent(OTHER_USER_ID, DOC_ID, "COMMENT_ADDED",
|
||||||
|
Instant.parse("2026-04-20T10:00:00Z"), Map.of("commentId", commentId.toString()));
|
||||||
|
insertReplyNotification(OTHER_USER_ID, DOC_ID, commentId);
|
||||||
|
|
||||||
|
List<ActivityFeedRow> rows = auditLogQueryRepository.findRolledUpActivityFeed(USER_ID.toString(), 40);
|
||||||
|
|
||||||
|
assertThat(rows).allSatisfy(r ->
|
||||||
|
assertThat(r.isYouParticipated()).isFalse()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void youMentioned_is_true_when_mention_created_payload_matches_current_user() {
|
void youMentioned_is_true_when_mention_created_payload_matches_current_user() {
|
||||||
insertUserAndDocs();
|
insertUserAndDocs();
|
||||||
|
|||||||
Reference in New Issue
Block a user