[bug]: Workspace drafts: members get 403 on their own draft; admins can delete other users’ drafts
Los mantenedores suelen responder en 1 día
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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
- Lenguaje dominante
- TypeScript
- Estrellas
- 60.7k
- Forks
- 6k
- Merge medio
- 1 d 11 h
- PR fusionados (30 d)
- 79
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de makeplane/plane
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
[bug]: Email notifications show a broken avatar for users without a profile photoPosiblemente ocupada @gurnoorpannu la tomó hace 4 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
makeplane/plane#10009 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
🐛 Bug: Calendar work items cannot be opened on mobilePosiblemente ocupada @pennnnnnnnnn la tomó hace 6 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
[bug]: First day of the week section not translated when Idioma is EspañolPosiblemente ocupada @deepcfr la tomó hace 9 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
makeplane/plane#9967 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
[bug]: First day of the week section not translated when Idioma is EspañolPosiblemente ocupada @Indira-kumar la tomó hace 7 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
Todos los issues de makeplane/plane
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Pet submission: Sleepwing / 眠翼鸟Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
OpenPetsHQ/openpets#273 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
fritzprix/libr-agent#2161 ·
Los mantenedores suelen responder en 1 día
-
macOS: clicking a menu item that has a submenu closes the menu instead of opening the submenuAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
blackboardsh/electrobun#581 ·
-
backlog-skill effort:xs frontend infra ready-for-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
LucasSantana-Dev/Lucky#2862 ·
Los mantenedores suelen responder en 1 día