mirror of
https://github.com/makeplane/plane.git
synced 2026-07-10 20:41:15 +02:00
* fix: scope workspace user preference filter to current user Without user=request.user on the PATCH filter, the ORM could match another user's preference record in the same workspace, causing pin/unpin state to leak across users or silently fail to persist. Fixes #9260 Signed-off-by: okxint <cashmein.eth@gmail.com> * test: add regression coverage for workspace user preference scoping (#9260) Adds contract tests for the sidebar preference PATCH endpoint: - test_patch_only_updates_requesting_users_preference: in a multi-member workspace, a member's PATCH must update only their own preference row, never another member's. Fails against the pre-fix code (the unscoped .first() mutates the most-recently-created row regardless of user). - test_patch_updates_own_preference: baseline that a member's PATCH persists to their own row. Verified RED on the unpatched view and GREEN with the user=request.user filter from #9261. * fix(api): wrap long line to satisfy ruff E501 in user preference view --------- Signed-off-by: okxint <cashmein.eth@gmail.com> Co-authored-by: okxint <cashmein.eth@gmail.com>