Current behavior
Sidebar pin/unpin changes return 200 OK but are not saved for the requesting user. After page refresh, pins revert to previous state.
Root cause
In plane/app/views/workspace/user_preference.py, the patch method filters preferences without scoping to request.user:
# v1.3.1 — missing user filter
preference = WorkspaceUserPreference.objects.filter(
key=key, workspace__slug=slug
).first()
In a workspace with multiple members, this returns the first matching record regardless of user — so the wrong user's preference gets updated.
Fix
Add user=request.user to the filter:
preference = WorkspaceUserPreference.objects.filter(
key=key, workspace__slug=slug, user=request.user
).first()
Steps to reproduce
- Self-host Plane v1.3.1 with Docker
- Create a workspace with 2+ members
- Log in as any user
- Pin a sidebar item (e.g. Analytics, Archives)
- Refresh the page → pin reverts
Verified
- DB shows
is_pinned: False after PATCH despite 200 OK response
- Adding
user=request.user to the filter fixes the issue permanently
Version
v1.3.1 (self-hosted Docker)
Current behavior
Sidebar pin/unpin changes return 200 OK but are not saved for the requesting user. After page refresh, pins revert to previous state.
Root cause
In
plane/app/views/workspace/user_preference.py, thepatchmethod filters preferences without scoping torequest.user:In a workspace with multiple members, this returns the first matching record regardless of user — so the wrong user's preference gets updated.
Fix
Add
user=request.userto the filter:Steps to reproduce
Verified
is_pinned: Falseafter PATCH despite 200 OK responseuser=request.userto the filter fixes the issue permanentlyVersion
v1.3.1 (self-hosted Docker)