Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[bug]: Workspace drafts: members get 403 on their own draft; admins can delete other users’ drafts

Đang mở
#10,001 1 bình luận 0 reaction 2 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@vihar đang làm issue này rồi.

Từ ngày 13/10/2026.

  • #10002 của @dhruv123shah — đang mở
  • #10006 của @Vishesh-Verma-07 — đang mở

Đánh giá

Issue này chưa được đánh giá.

Mô tả

🐛bug plane
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:

  1. Members get 403 on their own draft.retrieve is decorated with allowed_roles=[ROLE.ADMIN], creator=True, model=Issue. A draft id never exists in the Issue table, 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.

  2. Admins can delete other users' private drafts. destroy fetches the draft with DraftIssue.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

  1. In a workspace, log in as a user with the Member role.
  2. Create a draft work item (POST /api/workspaces//draft-issues/).
  3. GET /api/workspaces//draft-issues/<draft_id>/
  4. Response: 403 "You don't have the required permissions." (expected 200)

Admin can delete another user's draft

  1. As a Member, create a draft and note its id.
  2. Log in as a workspace Admin.
  3. DELETE /api/workspaces//draft-issues/<member_draft_id>/
  4. Response: 204 and the member's draft is deleted (expected 404)
Environment

Production

Browser

None

Edition

Community

Version

0.17.0-dev

Ngôn ngữ chính
TypeScript
Star
61.5k
Fork
6.2k
Merge trung bình
1 ngày 18 giờ
Pull request đã merge (30 ngày)
79

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của makeplane/plane

Tất cả issue của makeplane/plane

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.