Skip to content

fix(api): Require project:write for transaction threshold override mutations#108470

Merged
dcramer merged 1 commit intomasterfrom
fix/transaction-threshold-override-permissions
Feb 18, 2026
Merged

fix(api): Require project:write for transaction threshold override mutations#108470
dcramer merged 1 commit intomasterfrom
fix/transaction-threshold-override-permissions

Conversation

@dcramer
Copy link
Copy Markdown
Member

@dcramer dcramer commented Feb 18, 2026

The ProjectTransactionThresholdOverridePermission scope_map mapped all HTTP methods (GET/POST/PUT/DELETE) to org:read, allowing any org member — including the lowest-privilege member role — to create, update, and delete project-wide transaction threshold overrides. These overrides affect performance monitoring display for all users in the project.

This is inconsistent with the sibling ProjectTransactionThresholdEndpoint, which correctly uses ProjectSettingPermission requiring project:write for mutations.

The fix aligns the override endpoint's scope_map to match:

  • GET: project:read, project:write, project:admin
  • POST/PUT/DELETE: project:write, project:admin

Test added to verify that a member-role user receives 403 on POST and DELETE.

…tations

The ProjectTransactionThresholdOverridePermission scope_map allowed
org:read for all HTTP methods, meaning any org member could create,
update, and delete project-wide transaction threshold overrides. This
is inconsistent with the sibling ProjectTransactionThresholdEndpoint
which correctly requires project:write via ProjectSettingPermission.

Align the override endpoint with the same scope requirements:
project:read for GET, project:write/admin for POST/PUT/DELETE.

Co-Authored-By: Claude <[email protected]>
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 18, 2026
@dcramer dcramer marked this pull request as ready for review February 18, 2026 18:53
@dcramer dcramer enabled auto-merge (squash) February 18, 2026 19:02
@dcramer dcramer merged commit cad7c7c into master Feb 18, 2026
109 of 111 checks passed
@dcramer dcramer deleted the fix/transaction-threshold-override-permissions branch February 18, 2026 20:45
JonasBa pushed a commit that referenced this pull request Feb 19, 2026
…tations (#108470)

The `ProjectTransactionThresholdOverridePermission` scope_map mapped all
HTTP methods (GET/POST/PUT/DELETE) to `org:read`, allowing any org
member — including the lowest-privilege `member` role — to create,
update, and delete project-wide transaction threshold overrides. These
overrides affect performance monitoring display for all users in the
project.

This is inconsistent with the sibling
`ProjectTransactionThresholdEndpoint`, which correctly uses
`ProjectSettingPermission` requiring `project:write` for mutations.

The fix aligns the override endpoint's scope_map to match:
- **GET**: `project:read`, `project:write`, `project:admin`
- **POST/PUT/DELETE**: `project:write`, `project:admin`

Test added to verify that a member-role user receives 403 on POST and
DELETE.

Co-authored-by: Claude <[email protected]>
mchen-sentry pushed a commit that referenced this pull request Feb 24, 2026
…tations (#108470)

The `ProjectTransactionThresholdOverridePermission` scope_map mapped all
HTTP methods (GET/POST/PUT/DELETE) to `org:read`, allowing any org
member — including the lowest-privilege `member` role — to create,
update, and delete project-wide transaction threshold overrides. These
overrides affect performance monitoring display for all users in the
project.

This is inconsistent with the sibling
`ProjectTransactionThresholdEndpoint`, which correctly uses
`ProjectSettingPermission` requiring `project:write` for mutations.

The fix aligns the override endpoint's scope_map to match:
- **GET**: `project:read`, `project:write`, `project:admin`
- **POST/PUT/DELETE**: `project:write`, `project:admin`

Test added to verify that a member-role user receives 403 on POST and
DELETE.

Co-authored-by: Claude <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Mar 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants