Skip to content

release: v1.4.4 - #10236

Closed
sriramveeraghanta wants to merge 19 commits into
masterfrom
release/v1.4.4
Closed

sriramveeraghanta wants to merge 19 commits into
masterfrom
release/v1.4.4

Conversation

@sriramveeraghanta

@sriramveeraghanta sriramveeraghanta commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

🐞 Bug fixes

  • Fixed external API asset endpoints failing with a server error. Requesting an upload URL for a user or work item asset, and requesting an asset's download URL, returned a 500 on v1.4.3.
  • Fixed work item history returning a server error when requested without an activity type filter.

🛡️ Security

This release fixes a set of access control issues, most of them in the external REST API (/api/v1/). Self-hosted instances should upgrade.

Access control and tenant isolation

  • Refused HTTP verbs that a URL routes to an action its view never defines. Previously PUT on projects, work items and modules fell through to the framework's default handler, which only checked that the caller was signed in, so any account could rewrite those objects and move a project into a workspace it controls.
  • Scoped published board detail routes to the workspace and project in the URL. Previously any signed-in user could read, change or delete another workspace's published boards.
  • Blocked workspace admins from moving a member into another workspace, as an admin, by sending a workspace field when updating the member. Member updates now accept only the role.
  • Limited listing, viewing and deleting project invitations to project admins.
  • Scoped work item comment and relation creation to the project in the URL. Previously a member of one project could comment on or relate a work item in another project or workspace, and the response returned that work item's details.
  • Required an active Admin or Member role in a draft's project to create, update or convert workspace drafts, and checked the draft's cycle, modules, state, labels, assignees, parent and estimate against that project.
  • Required project membership on every workspace-level asset route, including upload, download and duplication, and stopped the external ID lookup from returning asset IDs from other projects.
  • Applied the owning entity's role rules to confirming, updating, deleting and restoring assets: workspace admin for the workspace logo, project admin for the project cover, and project admin or uploader for attachments.
  • Limited export history to the requesting user's own exports.
  • Made work item system fields read-only on update. deleted_at, archived_at, sequence_id and is_draft can no longer be set through PATCH in the app or the external API, so deleting and archiving go through their own permission checks. Ignored fields no longer record activity or send notifications and webhooks.
  • Bound work item history and the comment list, update and delete to a work item in the URL's project. Previously they could be pointed at a work item in another project.
  • Extended the guest restriction to work item attachments, activity, comments, reactions, relations and versions. On a project where guests can't see all work items, a guest previously could read these for work items they didn't create.

External API

  • Enforced guest_view_all_features on the external API. On a project where guests can't see all work items, a guest can now read only the work items they created, with their comments, links, activity, attachments and relations. The attachment list endpoint now also requires project membership.
  • Stopped trusting created_by and created_at in request bodies for work items, comments and links. Previously a member could re-attribute a work item and then delete it as its creator.
  • Limited editing and deleting comments to the comment's author or a project admin, and deleting attachments to the uploader or a project admin. A project member's role can no longer be set above their workspace role.
  • Scoped project archive and unarchive to the project in the URL. Previously a member of one project could archive another project.

Behavior changes

  • created_by and created_at in external API request bodies are now ignored. Integrations that set them to preserve history get the token's user and the current time instead.
  • Work item sub-resource endpoints in the external API (comments, links, activities, attachments, relations) now return 404 for a work item that doesn't exist, instead of an empty list.

…9972)

* fix: enforce guest_view_all_features on the external API

Restricted guests (GUEST role, guest_view_all_features=False) could
self-issue a Personal API Token and read every work item in a project
via the external API -- including work items they did not create,
plus comments, links, activity, attachments, and relations -- because
apps/api/plane/api/views/issue.py never applied the created_by scoping
that 6+ app-side views already enforce (CE has no centralized
permission engine; every correct check here is a hand-rolled inline
check per view, matching that convention).

Adds two small helpers next to the existing user_has_issue_permission
in issue.py (is_restricted_guest, guest_cannot_view_issue), imported
into cycle.py/module.py:

- Issue-level queries (list/total_count, external-id lookup, detail,
  identifier lookup, search, cycle/module issue lists) row-filter to
  created_by=request.user for restricted guests.
- Sub-resource queries (links, comments, activities, attachments,
  relations) resolve the parent issue once and deny the whole request
  with 404 -- not 403, which would leak that the issue exists -- when
  the restricted guest cannot view it.

Bundled in the same change, found while auditing this file: the
IssueAttachmentListCreateAPIEndpoint.get attachment-list endpoint had
no permission check at all -- not even project membership -- for any
authenticated user. It now requires the same project-membership-or-
creator check its sibling create/patch/delete methods already enforce.
IssueAttachmentDetailAPIEndpoint.get's existing check is extended
(not replaced) to pass the resolved issue through, matching its own
sibling methods, so the guest-scoping check has an issue to check
against.

Incidental behavior change (all roles): sub-resource endpoints
(comments/links/activities/attachments/relations) now 404 on a
syntactically valid but nonexistent issue_id, instead of silently
returning an empty list for any caller. This is a side effect of the
parent-issue lookup the guest-scoping fix requires, confirmed
consistent with IssueDetailAPIEndpoint's existing 404-on-missing-issue
behavior, and treated as a correctness improvement rather than a
regression -- reviewed and accepted, not accidental. Covered by
test_admin_404s_on_nonexistent_issue_id in both the comments-list and
comment-detail test classes (the other 7 sub-resource endpoints share
the same Issue.objects.get(...)-then-guest-check code path).

Review fixups: the tiered Q()/Exists(OuterRef()) search-scoping
comment in issue.py/cycle.py/module.py wrongly credited
IssueViewSet.list, which actually uses a simple boolean guard, not the
tiered pattern -- corrected to cite the real precedent,
IssueDetailEndpoint.get (app/views/issue/base.py:1027-1060). Added a
workspace-wide search regression test for a user who is a plain Member
on one project and a restricted Guest on another, the scenario that
motivated the EXISTS/OuterRef rewrite in the first place.

New contract tests in
apps/api/plane/tests/contract/api/test_external_api_guest_issue_visibility.py
(65 cases, up from 62) cover every endpoint above: restricted guest
denied on a foreign-authored issue/resource, allowed on their own,
positive controls for guest_view_all_features=True and full
member/admin, the mixed Member/restricted-Guest search scenario, and
the two nonexistent-issue-id 404 checks. The original revert-and-rerun
derivation against the pre-fix code (18 fail / 321 pass, all 18 being
the vulnerability tests, no unrelated failures) stands for the initial
62 cases; with the 3 added cases, the patched baseline is a clean
342 pass / 0 fail (contract marker) and 765 pass / 0 fail (full suite).
ruff check clean.

Co-authored with Plane-Ai <noreply@plane.so>

Claude-Session: https://claude.ai/code/session_01Aj2dgfB4RzsWdA8R9qup1A

* fix: address public PR review findings for guest visibility scoping

Three issues found by Copilot/CodeRabbit review on the external-API guest
visibility port carried over bugs already fixed during the companion
plane-ee review:

- IssueAttachmentDetailAPIEndpoint.get: scope the FileAsset lookup to
  issue_id + entity_type so a guest can't pair their own authorized
  issue_id with a foreign issue's attachment pk to get a download redirect.
- IssueCommentDetailAPIEndpoint.patch/delete: check guest_cannot_view_issue
  before mutating a comment -- ProjectLitePermission alone let any active
  member, including a restricted guest, reach these methods.
- ModuleIssueDetailAPIEndpoint.get / CycleIssueDetailAPIEndpoint.get: add
  the restricted-guest check their list siblings already have. (The module
  endpoint's GET is unreachable dead code per its URL routing -- documented
  with a test -- but the cycle endpoint's GET is a real, now-fixed gap.)

Co-authored with Plane-Ai <noreply@plane.so>

Claude-Session: https://claude.ai/code/session_01Aj2dgfB4RzsWdA8R9qup1A

* fix: close the same unbound FileAsset lookup on attachment delete/patch

IssueAttachmentDetailAPIEndpoint.delete and .patch had the identical
unbound FileAsset lookup (pk/workspace/project only, no issue_id or
entity_type) that was just fixed on .get(): a caller could pair their
own authorized issue_id with a foreign issue's attachment pk and
delete or modify that attachment's metadata. Found proactively while
fixing the sibling .get() endpoint, not flagged by review bots.

Binds both lookups to issue_id + entity_type, matching the .get() fix.
Adds regression coverage: cross-parent delete/patch 404s for both
guest and non-guest callers, same-issue delete/patch still works.

Co-authored with Plane-Ai <noreply@plane.so>

Claude-Session: https://claude.ai/code/session_01Aj2dgfB4RzsWdA8R9qup1A

* fix: check parent-issue visibility before attachment delete/patch

The scoped FileAsset lookup fixed cross-parent ID confusion but left
IssueAttachmentDetailAPIEndpoint.delete/.patch gated only by
user_has_issue_permission, which lets any active project member
through -- including a restricted guest. A guest supplying a foreign
issue's own, correctly-matched attachment id could still delete or
confirm its upload. Add the same guest_cannot_view_issue check the
.get() method already has.

Co-authored with Plane-Ai <noreply@plane.so>

Claude-Session: https://claude.ai/code/session_01Aj2dgfB4RzsWdA8R9qup1A

* fix: close remaining write-path guest-visibility gaps via systematic sweep

Two Copilot findings on PR #9972 (IssueCommentListCreateAPIEndpoint.post and
IssueAttachmentListCreateAPIEndpoint.post not calling guest_cannot_view_issue
before mutating) are the 4th round of the same root-cause: a write method not
wired to the guest check its GET/list sibling already has.

Rather than fix just those two, audited every post/put/patch/delete across
all 9 issue.py classes this fix has touched. Confirmed via permission-class
inspection that ProjectEntityPermission already excludes GUEST from every
write method (role__in=[ADMIN, MEMBER]), so IssueDetailAPIEndpoint.put/patch/
delete, IssueLinkListCreateAPIEndpoint.post, IssueLinkDetailAPIEndpoint.patch/
delete, and IssueRelationListCreateAPIEndpoint.post were already safe and
left untouched. ProjectLitePermission and the attachment endpoints' inline
user_has_issue_permission check both admit GUEST on every method, which is
why only the two Copilot-flagged methods had a real gap -- now closed with
the same guest_cannot_view_issue pattern used everywhere else in this file.

Added regression tests for both: restricted guest denied (404) creating a
comment/attachment-upload-request on a foreign issue, guest allowed on own
issue, guest_view_all_features=True positive control, non-guest/admin
unaffected.

Co-authored with Plane-Ai <noreply@plane.so>

Claude-Session: https://claude.ai/code/session_01Aj2dgfB4RzsWdA8R9qup1A

* [WEB-9423] fix: address review feedback

- Scope the v1 intake list and detail reads for restricted guests to the
  intake work items they submitted.
- Require active project membership to list or download attachments; the
  issue creator no longer bypasses it.
- Omit related work items the caller cannot view from relation lists, using
  a shared visible_issue_q filter (also used by search).
- Reword test docstrings and comments to state the expected behaviour.
- Tests: intake list/detail scoping, former-member attachment reads, and
  relation filtering.

* [WEB-9423] fix: scope intake delete like the intake reads

- A restricted guest gets 404 when deleting an intake work item they did
  not submit, consistent with the intake list/detail reads.
- Deleting requires the work item's creator, a project admin or a
  workspace admin for every intake status, matching
  IntakeIssueViewSet.destroy.
- Tests for guest, member, workspace admin and project admin deletes.

---------

Co-authored-by: Dheeraj Kumar Ketireddy <dheeru0198@gmail.com>
(cherry picked from commit 3a932da)
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ae3c704d-f202-48a0-8bc4-8c93c3825a95

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@makeplane

makeplane Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Linked to Plane Work Item(s)

This comment was auto-generated by Plane

mguptahub and others added 17 commits November 10, 2026 01:36
* [WEB-8332] fix(security): block workspace-member mass-assignment (GHSA-f739-39g5-jj49)

WorkSpaceMemberViewSet.partial_update passed request.data verbatim into
WorkSpaceMemberSerializer (fields="__all__"), making workspace, role, and
is_active mass-assignable. A workspace admin could PATCH a member row setting
workspace=<victim UUID> and role=20, relocating a controlled account into the
victim workspace as admin — full cross-tenant takeover.

The endpoint's only legitimate mutation is `role`, so restrict the writable
payload to {"role": ...}. Note: passing fields=("id","member","role") does NOT
work — DynamicBaseSerializer discards the fields= kwarg (base.py) — so the
allowlist is enforced in the view instead. Preserves the self-role-update guard
and the guest role-cascade. is_active is only changed via destroy(), not here.

Adds 4 contract tests; fail-before verified (2 attack tests failed unpatched → 4 pass).

Co-authored-by: Plane AI <noreply@plane.so>

* [WEB-8332] fix: validate role before guest-cascade, make it atomic (Copilot #9460)

partial_update cascaded the guest project-role downgrade BEFORE the serializer
was validated/saved, using a manual int() cast that 500s on non-integer input.
Reorder: validate the serializer first, then cascade using
serializer.validated_data["role"] inside a transaction.atomic() with save(), so a
bad role returns 400 (not 500) and project roles can't be downgraded when the
member update doesn't persist. Adds a non-integer-role 400 test.

Co-authored-by: Plane AI <noreply@plane.so>

* [WEB-8332] test: assert allowed role applied + guard cascade on invalid update (CodeRabbit #9460)

Address two CodeRabbit review comments:

- Mixed-payload takeover test now also asserts the permitted field (role) in
  the same payload WAS applied (role == 20), proving the fix filters the
  payload rather than rejecting it wholesale.
- test_non_integer_role_is_400_not_500 now seeds a non-guest ProjectMember and
  asserts it stays role 15 after the invalid PATCH, so a regression that let
  the guest project-role cascade run on a failed update would be caught.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* [WEB-8332] fix: no-op partial_update when payload has no writable field (Copilot #9460)

When a PATCH carries only forbidden keys (e.g. {"is_active": false}), allowed_data
is empty and the previous code still called serializer.save() — a no-op write that
bumped updated_at/updated_by and ran through the save path for nothing.

Early-return the current serialized member (200) when there are no allowed fields,
so a forbidden-only payload has no side effects. Strengthened the is_active test to
assert updated_at is unchanged (fail-before verified).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(security): drop advisory identifiers from code comments

Explanations kept unchanged; only the IDs are removed.

Co-authored-by: Plane AI <noreply@plane.so>

* [WEB-8332] fix: reject non-role payloads and harden member role update

- Reject any partial_update payload other than {"role": ...} with 400,
  including non-object JSON bodies (previously 500).
- Mark workspace/is_active/audit columns read-only on the workspace
  member serializers so the fix doesn't rely on the view alone.
- Save only role/updated_at/updated_by so a concurrent removal or
  view_props write isn't reverted by a stale full-row save.
- Block demotion to guest when the member is the sole admin of a
  project, matching leave()/destroy().
- Fix destroy()'s sole-admin guard, which compared a user id with a
  WorkspaceMember id and never fired; share one helper across all three.
- Bump ProjectMember.updated_at on the guest downgrade; use ROLE.GUEST.
- Tests: cover the downgrade, sole-admin guards, non-object bodies and
  an invalid role that passed the old int() check; use shared fixtures.

---------

Co-authored-by: Plane AI <noreply@plane.so>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Sriram Veeraghanta <veeraghanta.sriram@gmail.com>
(cherry picked from commit 4605f00)
…0016)

* fix: cap external-API write paths to the holder's role (WEB-9425)

Comment PATCH/DELETE now require the comment creator or a project admin,
attachment DELETE requires the attachment creator or a project admin (the
GUEST-inclusive allowed_roles made the role gate vacuous), and project
member role assignment cannot exceed the target's workspace role.

Existing guest-scope fixtures now set created_by explicitly, and two tests
that encoded the old over-permissive behaviour expect 403.

Claude-Session: https://claude.ai/code/session_01R96oPRMASLFo8E5kiCpviK

* [WEB-9425] fix: preserve attachment creator on confirm, require active membership for creator checks, document 403s

Claude-Session: https://claude.ai/code/session_01R96oPRMASLFo8E5kiCpviK

* [WEB-9425] fix: check effective role on partial member update; split side-effect asserts in tests

Claude-Session: https://claude.ai/code/session_01R96oPRMASLFo8E5kiCpviK

* [WEB-9425] fix: address review feedback

- Comment edit/delete and attachment delete also allow a workspace admin
  who is an active project member, matching the app's allow_permission
  (new is_project_or_workspace_admin helper).
- Project member role validation rejects a target without an active
  workspace membership; preview's POST/PATCH active-member checks are kept.
- Neutral wording for the attachment upload-confirm test and comment.
- Tests: workspace-admin override for comments and attachments (and its
  project-membership requirement), inactive workspace targets on POST and
  PATCH, and the serializer rule.

* [WEB-9425] fix: address review feedback

- Comment PATCH/DELETE and attachment DELETE: admins (including a workspace
  admin who holds the project GUEST role) now skip the guest visibility
  gate, matching the app's allow_permission admin rule. The admin check is
  computed once and reused for the role check.
- Add contract tests with guest_view_all_features disabled: a workspace
  admin with a project GUEST role can edit/delete another user's comment
  and delete another user's attachment; a workspace member with a project
  GUEST role still gets 404.

---------

Co-authored-by: Dheeraj Kumar Ketireddy <dheeru0198@gmail.com>
(cherry picked from commit 7805576)
…ed DRF mixins (#9652)

* fix(security): refuse routed actions served by unauthorized DRF mixins
* fix(security): share the non-authorizing permission set with the route scan
* fix(security): resolve perform_create against its actual owner, not just its presence
* fix(security): resolve the guard's permissions from get_permissions(), mirror partial_update on the other-surface scan
* [INFRA-496] fix: address review feedback
* [INFRA-496] test: drop routes preview now authorizes from the guard manifest

Co-authored-by: Dheeraj Kumar Ketireddy <dheeru0198@gmail.com>
(cherry picked from commit 442b396)
…L workspace/project (#9481)

* [WEB-8400] fix(security): scope DeployBoardViewSet queryset to the URL workspace/project
* [WEB-8400] test: cover same-workspace/other-project board scope
* chore(security): drop advisory identifiers from code comments
* [WEB-8400] fix: address review feedback

Co-authored-by: Dheeraj Kumar Ketireddy <dheeru0198@gmail.com>
(cherry picked from commit a9e7036)
…o the URL project (#9531)

* [SECUR-243] fix(security): scope issue comment + relation create to the URL project

ProjectEntityPermission and allow_permission validate only that the caller is an
active member of the URL's project_id. Neither validates that the sibling issue_id
path parameter belongs to that project or workspace, and two write handlers used
issue_id unscoped:

- IssueCommentViewSet.create resolved the issue with Issue.objects.get(pk=issue_id).
  Any member of any one project could comment on an issue in another project or
  workspace, and the 201 response serialized that issue's full issue_detail — name,
  description_json, description_html, priority, dates, sequence_id — back to the
  caller, making this a cross-tenant read as well as a write.

- IssueRelationViewSet.create workspace-scoped the request-body issues list but used
  the URL issue_id unscoped as the other side of the relation, so the earlier scoping
  fix covered one side of the relationship and missed the other.

Both lookups are now bound to workspace__slug + project_id and 404 otherwise,
matching the pattern already used by sub_issue.py get() and PagesDescriptionViewSet.

The third vector in the advisory (SubIssuesEndpoint.post) is already addressed by
open PR #9466 and is deliberately not touched here.

Adds contract regression coverage for both endpoints: cross-workspace and
same-workspace-other-project both 404 with nothing written and no detail leaked,
plus positive controls for the in-project paths.

Advisory: GHSA-hvx3-58mp-5fpx
Co-authored-by: Plane AI <noreply@plane.so>

* [SECUR-243] fix(security): scope issue relation removal to the URL project

Follow-up from adversarial review of the create-path fix: remove_relation had the
same gap on the delete side. It filtered IssueRelation on workspace__slug only and
never checked that the URL issue_id belongs to the URL project, so a member of one
project could delete relations between two issues of a sibling project in the same
workspace — verified 204 with deleted_at set on the sibling project's row.

Applies the same participant binding as create(): the URL issue must live in the URL
project. The IssueRelation row itself stays workspace-scoped, because relations
legitimately span projects and either participant's project may remove them.

Also returns 404 instead of a 500 when no relation matches — the handler did
.first() and then called .delete() on None (AttributeError -> generic 500).

Adds coverage for the sibling-project delete, the missing-relation 404, and a
positive control, plus tests pinning the IssueManager boundary: comment.py
deliberately uses Issue.objects (intake/triage, archived and draft issues must stay
commentable) while relation.py uses Issue.issue_objects (matching the body `issues`
filter and SubIssuesEndpoint). That axis was previously untested, so "tidying" the
two to match would have silently broken commenting on intake items.

Co-authored-by: Plane AI <noreply@plane.so>

* [SECUR-243] fix(security): scope issue relation list to the URL project

Addresses Copilot review on #9531. IssueRelationViewSet.list had the same unscoped
issue_id as the write handlers: it filtered relations on workspace__slug only, so a
member of project A could list the relations of an issue in project B of the same
workspace and receive that issue's name, priority, sequence_id, assignee_ids and
label_ids. Verified 200 with the foreign issue's name in the body before the fix.

Extracts the binding into a module-level issue_in_project() helper (per CodeRabbit)
now that list, create and remove_relation all need it — one place to get right, and
the next handler added to this file has an obvious thing to call.

Adds contract coverage for the list path (cross-project 404 with no name leak, plus
an in-project positive control), extends the IssueManager boundary tests to
remove_relation and list so all handlers are pinned to the same manager, and pins
that a non-UUID related_issue is a 400 rather than a 500 — Copilot flagged that as a
500 risk, but Django raises ValidationError on UUID coercion and
BaseViewSet.handle_exception already converts it. The test locks that in.

Co-authored-by: Plane AI <noreply@plane.so>

* chore(security): drop advisory identifiers from code comments

Explanations kept unchanged; only the IDs are removed.

Co-authored-by: Plane AI <noreply@plane.so>

* fix(security): keep archived-issue relations readable within their own project

The list() project-scope guard added for the cross-project relation-list
IDOR used Issue.issue_objects to look up the parent issue, but that
manager excludes archived issues — so viewing relations on an archived
issue started 404ing even for members of its own project. The issue
detail page fetches relations unconditionally on load, including for
archived issues, and renders the panel read-only rather than hiding it
there, so this closed off a legitimate read path along with the hole.

Give issue_in_project() an include_archived flag and use it only in
list(), following the same Issue.objects (archive-inclusive) pattern
IssueViewSet.retrieve() already uses for reads. The write paths
(create/remove_relation) keep the narrower issue_objects manager
unchanged, and the project/workspace scoping check itself is untouched
in all three, so the original cross-project fix still holds.

Co-authored-by: Plane AI <noreply@plane.so>

---------

Co-authored-by: Plane AI <noreply@plane.so>
(cherry picked from commit ac0d55d)
…drafts (#10047)

* [INFRA-1125] fix(security): require project membership for workspace drafts

Draft create/update and draft-to-issue conversion now require an active
ADMIN/MEMBER role in the draft's project within the URL workspace, matching
IssueViewSet.create. The draft serializer's project field is read-only.

* [INFRA-1125] fix(security): address review

Draft updates also require write access to the draft's own project, and a
draft's cycle_id/module_ids must belong to the draft's project (400 otherwise).

* [INFRA-1125] fix(security): address review

Validate the convert cycle_id and module_ids against the draft's project before creating anything.

* [INFRA-1125] fix(security): address review feedback

- Validate state, labels, assignees, parent and estimate point in a draft
  PATCH against the draft's own project instead of the supplied project_id.
  The access check on the supplied project_id is unchanged.
- Test: a writer of two projects cannot set a state from the other project.

* [INFRA-1125] fix(security): address review feedback

- can_write_project also accepts a workspace ADMIN who is an active
  member of the project at any role, matching allow_permission
- Tests: workspace admin who is a project guest can create, update and
  convert a draft; a workspace admin outside the project cannot

(cherry picked from commit 1fc7353)
…10068)

* [INFRA-1149] fix(security): apply entity role rules to asset changes

Confirm, update and delete on the generic asset routes now follow the rule of
the asset's entity: workspace admin for the logo, project admin for the cover,
project admin or uploader for attachments, member or uploader otherwise (INFRA-1149, INFRA-1197).

* [INFRA-1149] fix(security): address review

Rename asset role tests after the permission rule each one covers.

* [INFRA-1149] fix(security): address review feedback

- Asset restore applies the same role rule as update/delete (can_modify_asset)
- Add a test: a project guest can't restore another user's deleted attachment, the uploader can
- Tests assign the response before asserting on its status instead of making requests inside assert

* [INFRA-1149] fix(security): address review feedback

- The legacy asset delete and restore routes (by asset path) apply
  can_modify_asset, like the v2 routes.
- can_modify_asset: the uploader shortcut requires an active role in the
  asset's project, if it has one.
- Tests: legacy delete/restore follow the role rules; an uploader with an
  inactive project membership cannot delete or restore.

(cherry picked from commit ebbc2e5)
…ect admins (#9444)

* [WEB-8291] fix: gate project invitation list/retrieve/destroy to project admins
* chore(security): drop advisory identifiers from code comments
* [WEB-8291] fix: address review feedback

(cherry picked from commit 0d7b541)
…ace-level asset route (#9657)

* [INFRA-501] fix(security): enforce project membership on every workspace-level asset route
* [INFRA-501] fix(security): stop the external-id dedup echo disclosing foreign asset ids
* [INFRA-501] test: pin absence of the asset identifier fields on a denied dedup match
* [INFRA-501] fix(security): require project scoping on asset create/duplicate
* [INFRA-501] fix(security): validate the destination entity_id, not project_id, for PROJECT_COVER duplicates
* [INFRA-501] fix: address review feedback

(cherry picked from commit 2802c15)
…ated_at on external API (#9704)

* [INFRA-772] fix(security): stop trusting body-supplied created_by/created_at on external API
* fix: tighten created_at assertions per CodeRabbit review on PR #9704
* [INFRA-772] fix: address review feedback

(cherry picked from commit 549ec76)
…esting user's own exports (#9707)

* [INFRA-778] fix(security): scope ExportIssuesEndpoint.get to the requesting user's own exports
* [INFRA-778] use status.HTTP_200_OK instead of bare 200 in the new test
* [INFRA-778] fix: address review feedback

(cherry picked from commit a5e958e)
…o the URL project (#9706)

* [INFRA-777] fix(security): scope ProjectArchiveUnarchiveAPIEndpoint to the URL project
* [INFRA-777] fix: address review feedback

Co-authored-by: Dheeraj Kumar Ketireddy <dheeru0198@gmail.com>
(cherry picked from commit af5f783)
…0051)

* [INFRA-1145] fix(security): bind issue history and comment list to the URL project

Issue history now 404s unless issue_id belongs to the URL workspace + project.
The comment list queryset also requires the comment's issue to be in the URL project.

* [INFRA-1145] fix(security): address review feedback

- Bind the comment partial_update and destroy lookups to an issue in the
  URL project (issue__project_id), matching the comment list.
- Test PATCH and DELETE of a comment keyed to an issue outside the URL
  project (404, comment kept), plus a PATCH positive control.

* [INFRA-1145] fix(security): address review feedback

- Comment list returns 404 when the issue is not in the URL workspace/project,
  matching the history endpoint (reuses issue_in_project).
- Test expects 404 for the comment list of an issue outside the URL project.

(cherry picked from commit 72431bf)
…ts + activity (#9467)

* [WEB-8353] fix(security): enforce guest issue visibility on attachments + activity
* chore(security): drop advisory identifiers from code comments
* [WEB-8353] fix(security): extend guest issue visibility guard to comments + reactions
* [WEB-8353] fix: address review feedback

(cherry picked from commit 5d2b4a6)
Taken from preview (#10008). The asset role tests cherry-picked from #10068
create several users, and the empty default username collides.
…9899)

Covers the merged activity/comment history endpoint, which previously
crashed with a 500 (`TypeError: 'IssueActivity' object is not
subscriptable`) when sorting raw model instances by `created_at`
instead of dict keys.

(cherry picked from commit c23728e)
…10048)

* [INFRA-1118] fix(security): make deleted_at read-only on work item serializers

Add deleted_at to read_only_fields on the v1 IssueSerializer and the app
IssueCreateSerializer, so PATCH cannot set it; deletion stays on DELETE.
Also covers INFRA-1202.

* [INFRA-1118] fix(security): address review

Make archived_at and sequence_id read-only on the v1 and app work item
serializers; archive/unarchive keep their dedicated endpoints.

* [INFRA-1118] fix(security): address review feedback

- Leave the serializer's read-only fields out of the data passed to
  issue_activity and model_activity on work item PATCH (app and v1), so an
  ignored field such as archived_at no longer records activity or sends
  notifications and webhooks.
- Tests assert the ignored field is absent from both payloads.

* [INFRA-1118] fix(security): address review feedback

- is_draft is read-only when updating a work item through the app
  IssueCreateSerializer and the v1 IssueSerializer; create is unchanged
- Intake updates (app and v1) and the v1 external-id upsert send only
  the writable fields to issue/model activity, via a shared
  writable_data helper also used by the existing work item updates
- Tests: is_draft on work item PATCH (app and v1), intake updates with
  archived_at record no archive activity (app and v1)

(cherry picked from commit a00293e)
@sriramveeraghanta

Copy link
Copy Markdown
Member Author

Closing: we're not shipping v1.4.4. These changes will go out in v1.5.0 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants