Skip to content

Commit 37dbe2f

Browse files
dcramermattrobenolt
authored andcommitted
Merge pull request #3877 from getsentry/fix/api-key-security
Correct scope of API key settings
1 parent 323a8ad commit 37dbe2f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/sentry/web/frontend/organization_api_key_settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Meta:
2121

2222

2323
class OrganizationApiKeySettingsView(OrganizationView):
24-
required_scope = 'org:write'
24+
required_scope = 'org:delete'
2525

2626
def handle(self, request, organization, key_id):
2727
key = get_object_or_404(ApiKey, organization=organization, id=key_id)

tests/sentry/web/frontend/test_organization_api_key_settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ def test_teamless_admin_cannot_load(self):
2020
def test_member_cannot_load(self):
2121
self.assert_member_cannot_access(self.path)
2222

23+
def test_manager_cannot_load(self):
24+
self.assert_manager_cannot_access(self.path)
25+
2326
def test_owner_can_load(self):
2427
self.assert_owner_can_access(self.path)
2528

0 commit comments

Comments
 (0)