Skip to content

Commit

Permalink
add region
Browse files Browse the repository at this point in the history
  • Loading branch information
roggenkemper committed Oct 25, 2024
1 parent 1633404 commit 59e8e12
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sentry/api/endpoints/organization_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
OrganizationSlugCollisionException,
organization_provisioning_service,
)
from sentry.types.region import get_local_region
from sentry.users.services.user.serial import serialize_generic_user
from sentry.utils.audit import create_audit_entry

Expand Down Expand Up @@ -398,7 +399,7 @@ def validate_aggregatedDataConsent(self, value):

def validate_genAIConsent(self, value):
request = self.context["request"]
if not request.access.has_scope("org:billing"):
if not request.access.has_scope("org:billing") or get_local_region().name != "us":
raise serializers.ValidationError("You do not have permission to change this option")
return value

Expand Down

0 comments on commit 59e8e12

Please sign in to comment.