[bug]: Workspace drafts: members get 403 on their own draft; admins can delete other users’ drafts
I maintainer di solito rispondono entro 1 giorno
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Is there an existing issue for this?
- I have searched the existing issues
Current behavior
Workspace drafts are meant to be private to their creator. list, partial_update and create_draft_to_issue in WorkspaceDraftIssueViewSet all scope the lookup to created_by=request.user, but two sibling actions don't:
-
Members get 403 on their own draft.
retrieveis decorated withallowed_roles=[ROLE.ADMIN], creator=True, model=Issue. A draft id never exists in theIssuetable, so the creator check never matches, and a workspace MEMBER gets{"error": "You don't have the required permissions."}when opening a draft they created. -
Admins can delete other users' private drafts.
destroyfetches the draft withDraftIssue.objects.get(workspace__slug=slug, pk=pk), with no owner check. A workspace ADMIN can delete another member's draft, even though they can't list or open it.
Expected: any ADMIN/MEMBER can open and delete their own drafts, and gets a 404 for someone else's draft (same as partial_update and create_draft_to_issue).
File: apps/api/plane/app/views/workspace/draft.py
I have a fix with contract tests ready and will open a PR.
Steps to reproduce
Member can't open own draft
- In a workspace, log in as a user with the Member role.
- Create a draft work item (POST /api/workspaces//draft-issues/).
- GET /api/workspaces//draft-issues/<draft_id>/
- Response: 403 "You don't have the required permissions." (expected 200)
Admin can delete another user's draft
- As a Member, create a draft and note its id.
- Log in as a workspace Admin.
- DELETE /api/workspaces//draft-issues/<member_draft_id>/
- Response: 204 and the member's draft is deleted (expected 404)
Environment
Production
Browser
None
Edition
Community
Version
0.17.0-dev
- Lingua principale
- TypeScript
- Stelle
- 60.7k
- Fork
- 6k
- Merge medio
- 1g 11h
- PR unite (30g)
- 79
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di makeplane/plane
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
[bug]: Email notifications show a broken avatar for users without a profile photoForse già presa @gurnoorpannu l’ha presa 4 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
makeplane/plane#10009 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
🐛 Bug: Calendar work items cannot be opened on mobileForse già presa @pennnnnnnnnn l’ha presa 6 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
[bug]: First day of the week section not translated when Idioma is EspañolForse già presa @deepcfr l’ha presa 9 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
makeplane/plane#9967 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[bug]: First day of the week section not translated when Idioma is EspañolForse già presa @Indira-kumar l’ha presa 7 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di makeplane/plane
Issue simili
-
bug priority: P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
wayfinder:task
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
bug customer-reported data-plane question Service Attention Storage
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
Azure/azure-rest-api-specs#47397 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Claude thinking budget can shrink capped Haiku responses to 2,048 tokensForse già presa @DavyMassoneto l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
diegosouzapw/OmniRoute#17109 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
paperclipai/paperclip#16785 ·
I maintainer di solito rispondono entro 1 giorno