Repository navigation
[WEB-10174] fix: scope user activity and recents to access - #10320
Conversation
…rrent access The user activity feed, the user workspace dashboard issue lists and recent-visit entity data now follow the same visibility rule as the issue list, so they only carry data from projects the user is still an active member of.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
sriramveeraghanta
left a comment
There was a problem hiding this comment.
LGTM. Non-blocking: the activity feed now joins through project membership on every page. Probably fine, but worth watching for heavy users.
Description
Three reads returned live data without checking that the caller can still see it, so a user removed from a project kept reading current titles and descriptions:
GET /api/users/me/activities/filtered only by actor, and its serializer embeds the live work item.Now:
_visible_issues_qfilter.get_favorite_entities, scoped to the row's workspace, with the restricted-guest rule for work items; anything no longer accessible returnsnull, which the web widget already drops.Response shapes are unchanged.
Behavior change:
nullentity data.Not changed: the dashboard's counts and distributions are still unscoped (numbers only).
Type of Change
Screenshots and Media (if applicable)
Test Scenarios
plane/tests/contract/app/test_user_activity_recents_scope_app.py: after the user's project membership is deactivated, the activity feed, the dashboard lists and recent visits no longer return that project's work item. 3 passed; all three fail without the fix.References
Created with Claude Code
Summary by CodeRabbit