Skip to content

Commit 1816b26

Browse files
committed
🔧 chore: remove data secrecy rpc service
1 parent 69490dd commit 1816b26

File tree

8 files changed

+5
-131
lines changed

8 files changed

+5
-131
lines changed
Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
from django.conf import settings
2-
from django.utils import timezone
32

43
from sentry import features
5-
from sentry.data_secrecy.service.service import data_secrecy_service
64
from sentry.models.organization import Organization
75
from sentry.organizations.services.organization import RpcOrganization, RpcUserOrganizationContext
86

@@ -11,7 +9,7 @@ def should_allow_superuser_access(
119
organization_context: Organization | RpcUserOrganizationContext,
1210
) -> bool:
1311

14-
# If self hosted installation, superuser access is allowed
12+
# If self hosted installation, allow superuser access
1513
if settings.SENTRY_SELF_HOSTED:
1614
return True
1715

@@ -21,19 +19,13 @@ def should_allow_superuser_access(
2119
else:
2220
organization = organization_context
2321

24-
# If organization does not have data-secrecy feature, return True
22+
# If organization does not have data-secrecy feature, allow superuser access
2523
if not features.has("organizations:data-secrecy", organization):
2624
return True
2725

28-
# If organization's prevent_superuser_access bitflag is False, return True
26+
# If organization's prevent_superuser_access bitflag is False, allow superuser access
2927
if not organization.flags.prevent_superuser_access:
3028
return True
3129

32-
ds = data_secrecy_service.get_data_secrecy_waiver(organization_id=organization.id)
33-
34-
# If no data secrecy waiver exists, data secrecy is active
35-
if ds is None:
36-
return False
37-
38-
# If current time is before the access_end time of the waiver, data secrecy is active
39-
return timezone.now() <= ds.access_end
30+
# If organization has data-secrecy feature, but prevent_superuser_access is True, prevent superuser access
31+
return False

src/sentry/data_secrecy/service/__init__.py

Whitespace-only changes.

src/sentry/data_secrecy/service/impl.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/sentry/data_secrecy/service/model.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/sentry/data_secrecy/service/serial.py

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/sentry/data_secrecy/service/service.py

Lines changed: 0 additions & 30 deletions
This file was deleted.

tests/sentry/data_secrecy/service/__init__.py

Whitespace-only changes.

tests/sentry/data_secrecy/service/test_data_secrecy_service.py

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)