Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(rbac): replace deprecated ADVANCED_PERMISSIONS (#56976)

Alex Lidere89d0efc36e4
diff --git a/ee/api/agentic_provisioning/test/test_resources.py b/ee/api/agentic_provisioning/test/test_resources.py
index b9cace905266..da7bc527304f 100644
--- a/ee/api/agentic_provisioning/test/test_resources.py
+++ b/ee/api/agentic_provisioning/test/test_resources.py
@@ -391,7 +391,7 @@ class TestProvisioningResources(ProvisioningTestBase):
from ee.models.rbac.access_control import AccessControl
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS},
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL},
]
self.organization.save()
self.organization_membership.level = OrganizationMembership.Level.MEMBER
@@ -436,7 +436,7 @@ class TestProvisioningResources(ProvisioningTestBase):
from ee.models.rbac.access_control import AccessControl
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS},
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL},
]
self.organization.save()
self.organization_membership.level = OrganizationMembership.Level.MEMBER
diff --git a/ee/api/rbac/access_control.py b/ee/api/rbac/access_control.py
index 6aafb80f3dda..4a26391475a3 100644
--- a/ee/api/rbac/access_control.py
+++ b/ee/api/rbac/access_control.py
@@ -498,7 +498,7 @@ class AccessControlViewSetMixin(_GenericViewSet):
# resource access and we must not surface them as the effective access level.
# NOTE: project-level role overrides are intentionally NOT gated here because
# UserTeamPermissions.effective_membership_level_for_parent_membership honors
- # role-backed project AccessControl rows whenever ADVANCED_PERMISSIONS is
+ # role-backed project AccessControl rows whenever ACCESS_CONTROL is
# enabled (no ROLE_BASED_ACCESS check), so gating the preview here would lie
# about a user's actual project access.
role_based_resource_access_supported = team.organization.is_feature_available(
@@ -611,7 +611,7 @@ class AccessControlViewSetMixin(_GenericViewSet):
# resource access level. NOTE: project-level role overrides are intentionally
# NOT gated here because UserTeamPermissions.effective_membership_level_for_
# parent_membership honors role-backed project AccessControl rows whenever
- # ADVANCED_PERMISSIONS is enabled (no ROLE_BASED_ACCESS check), so gating the
+ # ACCESS_CONTROL is enabled (no ROLE_BASED_ACCESS check), so gating the
# preview here would lie about a user's actual project access.
role_based_resource_access_supported = team.organization.is_feature_available(
AvailableFeature.ROLE_BASED_ACCESS
diff --git a/ee/api/rbac/test/test_access_control.py b/ee/api/rbac/test/test_access_control.py
index d6f246768b19..b7b44e9e33fa 100644
--- a/ee/api/rbac/test/test_access_control.py
+++ b/ee/api/rbac/test/test_access_control.py
@@ -24,7 +24,7 @@ class BaseAccessControlTest(APILicensedTest):
def setUp(self):
super().setUp()
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS},
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL},
{"key": AvailableFeature.ROLE_BASED_ACCESS, "name": AvailableFeature.ROLE_BASED_ACCESS},
]
self.organization.save()
@@ -1681,9 +1681,9 @@ class TestAccessControlRolesEndpoint(BaseAccessControlTest):
"""Without ROLE_BASED_ACCESS, role-based resource overrides are inert at runtime,
so the per-role preview must show the resource default as the effective level.
Project-level role overrides remain effective (runtime still honors them via
- UserTeamPermissions when ADVANCED_PERMISSIONS is enabled)."""
+ UserTeamPermissions when ACCESS_CONTROL is enabled)."""
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS},
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL},
]
self.organization.save()
@@ -1854,12 +1854,12 @@ class TestAccessControlMembersEndpoint(BaseAccessControlTest):
Project-level role overrides are deliberately NOT gated by this feature, because
UserTeamPermissions.effective_membership_level_for_parent_membership honors
- role-backed project AccessControl rows whenever ADVANCED_PERMISSIONS is enabled
+ role-backed project AccessControl rows whenever ACCESS_CONTROL is enabled
(no ROLE_BASED_ACCESS check). The preview must match that runtime behaviour.
"""
- # Remove the ROLE_BASED_ACCESS feature, keep ADVANCED_PERMISSIONS
+ # Remove the ROLE_BASED_ACCESS feature, keep ACCESS_CONTROL
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS},
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL},
]
self.organization.save()
diff --git a/ee/api/test/base.py b/ee/api/test/base.py
index 5f63b80d2c85..fd42cefd70e1 100644
--- a/ee/api/test/base.py
+++ b/ee/api/test/base.py
@@ -17,7 +17,7 @@ class LicensedTestMixin:
CONFIG_LICENSE_KEY: Optional[str] = "12345::67890"
CONFIG_LICENSE_PLAN: Optional[str] = "enterprise"
CONFIG_SYNC_ORGANIZATION_FEATURES_ON_SETUP: bool = True
- CONFIG_FORCE_ADVANCED_PERMISSIONS_ON_SETUP: bool = False
+ CONFIG_FORCE_ACCESS_CONTROL_ON_SETUP: bool = False
license: License = cast(License, None)
def license_required_response(
@@ -58,12 +58,10 @@ class APILicensedTest(LicensedTestMixin, APIBaseTest):
self.organization.update_available_product_features()
self.organization.save()
- if self.CONFIG_FORCE_ADVANCED_PERMISSIONS_ON_SETUP and not self.organization.is_feature_available(
- AvailableFeature.ADVANCED_PERMISSIONS
+ if self.CONFIG_FORCE_ACCESS_CONTROL_ON_SETUP and not self.organization.is_feature_available(
+ AvailableFeature.ACCESS_CONTROL
):
features = self.organization.available_product_features or []
- features.append(
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS}
- )
+ features.append({"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL})
self.organization.available_product_features = features
self.organization.save()
diff --git a/ee/api/test/test_dashboard_collaborators.py b/ee/api/test/test_dashboard_collaborators.py
index 3053dad90d80..261798c6b6f6 100644
--- a/ee/api/test/test_dashboard_collaborators.py
+++ b/ee/api/test/test_dashboard_collaborators.py
@@ -11,14 +11,14 @@ from ee.models.rbac.access_control import AccessControl
class TestDashboardCollaboratorsAPI(APILicensedTest):
- CONFIG_FORCE_ADVANCED_PERMISSIONS_ON_SETUP = True
+ CONFIG_FORCE_ACCESS_CONTROL_ON_SETUP = True
test_dashboard: Dashboard
def setUp(self):
super().setUp()
- if not self.organization.is_feature_available(AvailableFeature.ADVANCED_PERMISSIONS):
- self.skipTest("Dashboard collaborators tests require advanced permissions")
+ if not self.organization.is_feature_available(AvailableFeature.ACCESS_CONTROL):
+ self.skipTest("Dashboard collaborators tests require access control")
AccessControl.objects.create(
team=self.team,
diff --git a/ee/api/test/test_insight.py b/ee/api/test/test_insight.py
index 688ae6d3c90c..3a2cdbc53106 100644
--- a/ee/api/test/test_insight.py
+++ b/ee/api/test/test_insight.py
@@ -23,15 +23,15 @@ from ee.models.rbac.access_control import AccessControl
class TestInsightEnterpriseAPI(APILicensedTest):
- CONFIG_FORCE_ADVANCED_PERMISSIONS_ON_SETUP = True
+ CONFIG_FORCE_ACCESS_CONTROL_ON_SETUP = True
def setUp(self) -> None:
super().setUp()
self.dashboard_api = DashboardAPI(self.client, self.team, self.assertEqual)
- def _require_advanced_permissions(self) -> None:
- if not self.organization.is_feature_available(AvailableFeature.ADVANCED_PERMISSIONS):
- self.skipTest("This insight RBAC test requires advanced permissions")
+ def _require_access_control(self) -> None:
+ if not self.organization.is_feature_available(AvailableFeature.ACCESS_CONTROL):
+ self.skipTest("This insight RBAC test requires access control")
def _set_project_default_member_access(self) -> None:
AccessControl.objects.create(
@@ -221,7 +221,7 @@ class TestInsightEnterpriseAPI(APILicensedTest):
def test_non_admin_user_with_privilege_can_add_an_insight_to_a_restricted_dashboard(
self,
) -> None:
- self._require_advanced_permissions()
+ self._require_access_control()
# create insight and dashboard separately with default user
dashboard_restricted: Dashboard = Dashboard.objects.create(
team=self.team,
@@ -253,7 +253,7 @@ class TestInsightEnterpriseAPI(APILicensedTest):
def test_an_insight_on_both_restricted_dashboard_does_not_restrict_with_explicit_privilege(
self,
) -> None:
- self._require_advanced_permissions()
+ self._require_access_control()
dashboard_restricted: Dashboard = Dashboard.objects.create(
team=self.team,
restriction_level=Dashboard.RestrictionLevel.ONLY_COLLABORATORS_CAN_EDIT,
@@ -281,7 +281,7 @@ class TestInsightEnterpriseAPI(APILicensedTest):
)
def test_cannot_update_restricted_insight_as_other_user_who_is_project_member(self):
- self._require_advanced_permissions()
+ self._require_access_control()
self._set_project_default_member_access()
creator = User.objects.create_and_join(self.organization, "[email protected]", None)
self.organization_membership.level = OrganizationMembership.Level.MEMBER
@@ -366,7 +366,7 @@ class TestInsightEnterpriseAPI(APILicensedTest):
]
def test_cannot_update_an_insight_if_on_restricted_dashboard(self) -> None:
- self._require_advanced_permissions()
+ self._require_access_control()
self._set_project_default_member_access()
dashboard_restricted: Dashboard = Dashboard.objects.create(
team=self.team,
@@ -390,7 +390,7 @@ class TestInsightEnterpriseAPI(APILicensedTest):
def test_non_admin_user_cannot_add_an_insight_to_a_restricted_dashboard(
self,
) -> None:
- self._require_advanced_permissions()
+ self._require_access_control()
self._set_project_default_member_access()
# create insight and dashboard separately with default user
dashboard_restricted_id, _ = self.dashboard_api.create_dashboard(
@@ -422,7 +422,7 @@ class TestInsightEnterpriseAPI(APILicensedTest):
assert response.status_code == status.HTTP_200_OK
def test_admin_user_can_add_an_insight_to_a_restricted_dashboard(self) -> None:
- self._require_advanced_permissions()
+ self._require_access_control()
# create insight and dashboard separately with default user
dashboard_restricted: Dashboard = Dashboard.objects.create(
team=self.team,
@@ -474,7 +474,7 @@ class TestInsightEnterpriseAPI(APILicensedTest):
def test_an_insight_on_restricted_dashboard_has_restrictions_cannot_edit_without_explicit_privilege(
self,
) -> None:
- self._require_advanced_permissions()
+ self._require_access_control()
self._set_project_default_member_access()
dashboard: Dashboard = Dashboard.objects.create(
team=self.team,
@@ -495,7 +495,7 @@ class TestInsightEnterpriseAPI(APILicensedTest):
def test_an_insight_on_both_restricted_and_unrestricted_dashboard_has_no_restrictions(
self,
) -> None:
- self._require_advanced_permissions()
+ self._require_access_control()
dashboard_restricted: Dashboard = Dashboard.objects.create(
team=self.team,
restriction_level=Dashboard.RestrictionLevel.ONLY_COLLABORATORS_CAN_EDIT,
@@ -520,7 +520,7 @@ class TestInsightEnterpriseAPI(APILicensedTest):
)
def test_an_insight_on_restricted_dashboard_does_not_restrict_admin(self) -> None:
- self._require_advanced_permissions()
+ self._require_access_control()
dashboard_restricted: Dashboard = Dashboard.objects.create(
team=self.team,
restriction_level=Dashboard.RestrictionLevel.ONLY_COLLABORATORS_CAN_EDIT,
@@ -595,7 +595,7 @@ class TestInsightEnterpriseAPI(APILicensedTest):
def test_non_admin_user_cannot_remove_an_insight_from_a_restricted_dashboard(
self,
) -> None:
- self._require_advanced_permissions()
+ self._require_access_control()
self._set_project_default_member_access()
# create a restricted dashboard with the default user (who has edit permission)
dashboard_restricted_id, _ = self.dashboard_api.create_dashboard(
diff --git a/ee/api/test/test_team.py b/ee/api/test/test_team.py
index abcd3ce8584a..56324345acb3 100644
--- a/ee/api/test/test_team.py
+++ b/ee/api/test/test_team.py
@@ -20,7 +20,7 @@ from ee.models.rbac.access_control import AccessControl
def team_enterprise_api_test_factory():
class TestTeamEnterpriseAPI(APILicensedTest):
CLASS_DATA_LEVEL_SETUP = False
- CONFIG_FORCE_ADVANCED_PERMISSIONS_ON_SETUP = True
+ CONFIG_FORCE_ACCESS_CONTROL_ON_SETUP = True
def _set_project_default_member_access(self, team: Team) -> None:
AccessControl.objects.create(
@@ -58,8 +58,8 @@ def team_enterprise_api_test_factory():
self._set_project_default_member_access(self.team)
- if not self.organization.is_feature_available(AvailableFeature.ADVANCED_PERMISSIONS):
- self.skipTest("Requires advanced permissions")
+ if not self.organization.is_feature_available(AvailableFeature.ACCESS_CONTROL):
+ self.skipTest("Requires access control")
response = self.client.delete(f"/api/environments/{self.team.id}")
self.assertEqual(response.status_code, HTTP_403_FORBIDDEN)
@@ -80,8 +80,8 @@ def team_enterprise_api_test_factory():
self._set_project_default_member_access(team)
- if not self.organization.is_feature_available(AvailableFeature.ADVANCED_PERMISSIONS):
- self.skipTest("Requires advanced permissions")
+ if not self.organization.is_feature_available(AvailableFeature.ACCESS_CONTROL):
+ self.skipTest("Requires access control")
response = self.client.delete(f"/api/environments/{team.id}")
self.assertEqual(response.status_code, HTTP_403_FORBIDDEN)
@@ -145,7 +145,7 @@ def team_enterprise_api_test_factory():
expected_effective_level = (
OrganizationMembership.Level.ADMIN
- if self.organization.is_feature_available(AvailableFeature.ADVANCED_PERMISSIONS)
+ if self.organization.is_feature_available(AvailableFeature.ACCESS_CONTROL)
else OrganizationMembership.Level.MEMBER
)
diff --git a/ee/clickhouse/views/test/test_clickhouse_groups.py b/ee/clickhouse/views/test/test_clickhouse_groups.py
index d3609ddcf6c1..767f0fe943b2 100644
--- a/ee/clickhouse/views/test/test_clickhouse_groups.py
+++ b/ee/clickhouse/views/test/test_clickhouse_groups.py
@@ -1679,7 +1679,7 @@ class GroupsTypesViewSetTestCase(APIBaseTest):
self.organization_membership.level = OrganizationMembership.Level.MEMBER
self.organization_membership.save()
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS},
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL},
]
self.organization.save()
# Grant member-level (not admin) project access so the request reaches the serializer
@@ -1920,7 +1920,7 @@ class GroupUsageMetricViewSetTestCase(APIBaseTest):
self.organization_membership.level = OrganizationMembership.Level.MEMBER
self.organization_membership.save()
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS},
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL},
]
self.organization.save()
# Grant member-level (not admin) project access so the request reaches the serializer
diff --git a/ee/models/license.py b/ee/models/license.py
index 2221b256295e..75f7b70e409c 100644
--- a/ee/models/license.py
+++ b/ee/models/license.py
@@ -73,7 +73,6 @@ class License(models.Model):
ENTERPRISE_PLAN = "enterprise"
ENTERPRISE_FEATURES = [
*SCALE_FEATURES,
- AvailableFeature.ADVANCED_PERMISSIONS,
AvailableFeature.ACCESS_CONTROL,
AvailableFeature.SAML,
AvailableFeature.SCIM,
diff --git a/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/AccessControlObject.tsx b/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/AccessControlObject.tsx
index faa35fafd6ce..6135d0f011c9 100644
--- a/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/AccessControlObject.tsx
+++ b/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/AccessControlObject.tsx
@@ -56,7 +56,7 @@ export function AccessControlObject(props: AccessControlLogicProps): JSX.Element
)}
</h2>
<p>{props.description}</p>
- <PayGateMini feature={AvailableFeature.ADVANCED_PERMISSIONS}>
+ <PayGateMini feature={AvailableFeature.ACCESS_CONTROL}>
<div className="deprecated-space-y-6">
{canEditAccessControls === false ? (
<LemonBanner type="warning">
@@ -97,7 +97,7 @@ function AccessControlObjectDefaults(): JSX.Element | null {
placeholder="Loading..."
value={accessControlDefault?.access_level ?? undefined}
onChange={(newValue) => {
- guardAvailableFeature(AvailableFeature.ADVANCED_PERMISSIONS, () => {
+ guardAvailableFeature(AvailableFeature.ACCESS_CONTROL, () => {
updateAccessControlDefault(newValue as AccessControlLevel)
})
}}
@@ -243,7 +243,7 @@ function AccessControlObjectUsers(): JSX.Element | null {
setModelOpen={setModelOpen}
placeholder="Search for team members to add…"
onAdd={async (newValues, level) => {
- if (guardAvailableFeature(AvailableFeature.ADVANCED_PERMISSIONS)) {
+ if (guardAvailableFeature(AvailableFeature.ACCESS_CONTROL)) {
await updateAccessControlMembers(newValues.map((member) => ({ member, level })))
setModelOpen(false)
}
@@ -356,7 +356,7 @@ function AccessControlObjectRoles(): JSX.Element | null {
setModelOpen={setModelOpen}
placeholder="Search for roles to add…"
onAdd={async (newValues, level) => {
- if (guardAvailableFeature(AvailableFeature.ADVANCED_PERMISSIONS)) {
+ if (guardAvailableFeature(AvailableFeature.ROLE_BASED_ACCESS)) {
await updateAccessControlRoles(newValues.map((role) => ({ role, level })))
setModelOpen(false)
}
diff --git a/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/ResourceAccessControlsV2/AccessControlDefaultSettings.tsx b/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/ResourceAccessControlsV2/AccessControlDefaultSettings.tsx
index c15146d35243..2d6178ea6ff1 100644
--- a/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/ResourceAccessControlsV2/AccessControlDefaultSettings.tsx
+++ b/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/ResourceAccessControlsV2/AccessControlDefaultSettings.tsx
@@ -24,7 +24,7 @@ export function AccessControlDefaultSettings({ projectId }: { projectId: string
} = defaults ?? {}
return (
- <PayGateMini feature={AvailableFeature.ADVANCED_PERMISSIONS}>
+ <PayGateMini feature={AvailableFeature.ACCESS_CONTROL}>
<div className="space-y-4">
<div className="p-3 bg-surface-primary rounded border border-border flex flex-row justify-between items-center">
<div>
diff --git a/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/ResourceAccessControlsV2/AccessControls.tsx b/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/ResourceAccessControlsV2/AccessControls.tsx
index d87be6bc3cd8..485e98480abc 100644
--- a/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/ResourceAccessControlsV2/AccessControls.tsx
+++ b/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/ResourceAccessControlsV2/AccessControls.tsx
@@ -91,12 +91,12 @@ function AccessControlTabContainer(props: { activeTab: AccessControlsTab; childr
if (props.activeTab === 'roles') {
return (
<PayGateMini feature={AvailableFeature.ROLE_BASED_ACCESS}>
- <PayGateMini feature={AvailableFeature.ADVANCED_PERMISSIONS}>{props.children}</PayGateMini>
+ <PayGateMini feature={AvailableFeature.ACCESS_CONTROL}>{props.children}</PayGateMini>
</PayGateMini>
)
}
if (props.activeTab === 'members') {
- return <PayGateMini feature={AvailableFeature.ADVANCED_PERMISSIONS}>{props.children}</PayGateMini>
+ return <PayGateMini feature={AvailableFeature.ACCESS_CONTROL}>{props.children}</PayGateMini>
}
return <>{props.children}</>
diff --git a/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/ResourcesAccessControls.tsx b/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/ResourcesAccessControls.tsx
index 04f079e4c898..dc1cbb6e73b4 100644
--- a/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/ResourcesAccessControls.tsx
+++ b/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/ResourcesAccessControls.tsx
@@ -234,7 +234,7 @@ export function ResourcesAccessControls(): JSX.Element {
flags, etc.) for individuals and roles.
</p>
- <PayGateMini feature={AvailableFeature.ADVANCED_PERMISSIONS}>
+ <PayGateMini feature={AvailableFeature.ACCESS_CONTROL}>
<div className="space-y-6">
{/* Default permissions table */}
<div className="space-y-2">
diff --git a/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/RolesAccessControls.tsx b/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/RolesAccessControls.tsx
index 4e5d7bd7f308..e1efd96c7a9d 100644
--- a/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/RolesAccessControls.tsx
+++ b/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/RolesAccessControls.tsx
@@ -358,7 +358,7 @@ export function DefaultRoleSelector(): JSX.Element {
value={currentOrganization?.default_role_id || null}
onChange={(value) => {
guardAvailableFeature(
- AvailableFeature.ADVANCED_PERMISSIONS,
+ AvailableFeature.ROLE_BASED_ACCESS,
updateOrganization.bind(null, { default_role_id: value })
)
}}
diff --git a/frontend/src/lib/components/PayGateMini/PayGateMini.stories.tsx b/frontend/src/lib/components/PayGateMini/PayGateMini.stories.tsx
index ae78c67710fa..9226c04386e4 100644
--- a/frontend/src/lib/components/PayGateMini/PayGateMini.stories.tsx
+++ b/frontend/src/lib/components/PayGateMini/PayGateMini.stories.tsx
@@ -76,7 +76,7 @@ export const PayGateMiniAddon: Story = {
}
export const PayGateMiniLimitFeatureOther: Story = {
- args: { feature: AvailableFeature.ADVANCED_PERMISSIONS, currentUsage: 3 },
+ args: { feature: AvailableFeature.ACCESS_CONTROL, currentUsage: 3 },
render: ({ cloud, ...props }) => {
useStorybookMocks({
get: {
@@ -88,8 +88,8 @@ export const PayGateMiniLimitFeatureOther: Story = {
...meCurrent.organization,
available_product_features: [
{
- key: 'advanced_permissions',
- name: 'Advanced Permissions',
+ key: 'access_control',
+ name: 'Access control',
},
],
},
diff --git a/frontend/src/lib/components/Sharing/SharingModal.stories.tsx b/frontend/src/lib/components/Sharing/SharingModal.stories.tsx
index a89550559adc..5cdd5e89e3f5 100644
--- a/frontend/src/lib/components/Sharing/SharingModal.stories.tsx
+++ b/frontend/src/lib/components/Sharing/SharingModal.stories.tsx
@@ -31,7 +31,7 @@ const meta: Meta<StoryArgs> = {
const { licensed = false, passwordRequired = false, ...props } = args
const [modalOpen, setModalOpen] = useState(false)
- useAvailableFeatures(licensed ? [AvailableFeature.WHITE_LABELLING, AvailableFeature.ADVANCED_PERMISSIONS] : [])
+ useAvailableFeatures(licensed ? [AvailableFeature.WHITE_LABELLING, AvailableFeature.ACCESS_CONTROL] : [])
useStorybookMocks({
get: {
diff --git a/frontend/src/lib/components/Sharing/SharingModal.tsx b/frontend/src/lib/components/Sharing/SharingModal.tsx
index 2455cda85026..917ce3f8d740 100644
--- a/frontend/src/lib/components/Sharing/SharingModal.tsx
+++ b/frontend/src/lib/components/Sharing/SharingModal.tsx
@@ -123,7 +123,7 @@ export function SharingModalContent({
}
const {
whitelabelAvailable,
- advancedPermissionsAvailable,
+ accessControlAvailable,
sharingConfiguration,
sharingConfigurationLoading,
showPreview,
@@ -261,7 +261,7 @@ export function SharingModalContent({
label={
<div className="flex items-center">
Password protect
- {!advancedPermissionsAvailable && (
+ {!accessControlAvailable && (
<Tooltip title="This is a premium feature, click to learn more.">
<IconLock className="ml-1.5 text-muted text-lg" />
</Tooltip>
@@ -270,9 +270,8 @@ export function SharingModalContent({
}
onChange={(passwordRequired: boolean) => {
if (passwordRequired) {
- guardAvailableFeature(
- AvailableFeature.ADVANCED_PERMISSIONS,
- () => setPasswordRequired(passwordRequired)
+ guardAvailableFeature(AvailableFeature.ACCESS_CONTROL, () =>
+ setPasswordRequired(passwordRequired)
)
} else {
setPasswordRequired(passwordRequired)
diff --git a/frontend/src/lib/components/Sharing/sharingLogic.ts b/frontend/src/lib/components/Sharing/sharingLogic.ts
index 1522ac43801b..c143ac945d00 100644
--- a/frontend/src/lib/components/Sharing/sharingLogic.ts
+++ b/frontend/src/lib/components/Sharing/sharingLogic.ts
@@ -158,9 +158,9 @@ export const sharingLogic = kea<sharingLogicType>([
() => [userLogic.selectors.hasAvailableFeature],
(hasAvailableFeature) => hasAvailableFeature(AvailableFeature.WHITE_LABELLING),
],
- advancedPermissionsAvailable: [
+ accessControlAvailable: [
() => [userLogic.selectors.hasAvailableFeature],
- (hasAvailableFeature) => hasAvailableFeature(AvailableFeature.ADVANCED_PERMISSIONS),
+ (hasAvailableFeature) => hasAvailableFeature(AvailableFeature.ACCESS_CONTROL),
],
sharingAllowed: [
diff --git a/frontend/src/scenes/settings/organization/InviteModal.tsx b/frontend/src/scenes/settings/organization/InviteModal.tsx
index 67ba8e91310d..3147eca3dd8c 100644
--- a/frontend/src/scenes/settings/organization/InviteModal.tsx
+++ b/frontend/src/scenes/settings/organization/InviteModal.tsx
@@ -193,7 +193,7 @@ export function InviteRow({
const name = PLACEHOLDER_NAMES[index % PLACEHOLDER_NAMES.length]
const { hasAvailableFeature } = useValues(userLogic)
- const hasAdvancedPermissions = hasAvailableFeature(AvailableFeature.ADVANCED_PERMISSIONS)
+ const hasAccessControl = hasAvailableFeature(AvailableFeature.ACCESS_CONTROL)
const { invitesToSend } = useValues(inviteLogic)
const { updateInviteAtIndex, inviteTeamMembers, deleteInviteAtIndex } = useActions(inviteLogic)
@@ -290,7 +290,7 @@ export function InviteRow({
)}
</div>
- {hasAdvancedPermissions && !hideProjectAccessSelector && <ProjectAccessSelector inviteIndex={index} />}
+ {hasAccessControl && !hideProjectAccessSelector && <ProjectAccessSelector inviteIndex={index} />}
</div>
)
}
diff --git a/posthog/api/file_system/test/test_file_system.py b/posthog/api/file_system/test/test_file_system.py
index f607c7af4feb..51d84043a42d 100644
--- a/posthog/api/file_system/test/test_file_system.py
+++ b/posthog/api/file_system/test/test_file_system.py
@@ -1082,9 +1082,9 @@ class TestFileSystemAPIAdvancedPermissions(APIBaseTest):
def setUp(self):
super().setUp()
- # Enable advanced permissions & role-based access
+ # Enable access control & role-based access
self.organization.available_product_features = [
- {"key": "advanced_permissions", "name": "advanced_permissions"},
+ {"key": "access_control", "name": "access_control"},
{"key": "role_based_access", "name": "role_based_access"},
]
self.organization.save()
diff --git a/posthog/api/sharing.py b/posthog/api/sharing.py
index 06af00151e86..752f07b8871f 100644
--- a/posthog/api/sharing.py
+++ b/posthog/api/sharing.py
@@ -384,9 +384,9 @@ class SharingConfigurationViewSet(TeamAndOrgViewSetMixin, mixins.ListModelMixin,
check_can_edit_sharing_configuration(self, request, instance)
if request.data.get("password_required", False):
- if not self.organization.is_feature_available(AvailableFeature.ADVANCED_PERMISSIONS):
+ if not self.organization.is_feature_available(AvailableFeature.ACCESS_CONTROL):
return response.Response(
- {"error": "Sharing with password requires the Advanced Permissions feature"}, status=403
+ {"error": "Sharing with password requires the Access Control feature"}, status=403
)
if context.get("recording"):
@@ -514,9 +514,9 @@ class SharingConfigurationViewSet(TeamAndOrgViewSetMixin, mixins.ListModelMixin,
status=status.HTTP_400_BAD_REQUEST,
)
- if not self.organization.is_feature_available(AvailableFeature.ADVANCED_PERMISSIONS):
+ if not self.organization.is_feature_available(AvailableFeature.ACCESS_CONTROL):
return response.Response(
- {"error": "Password management requires the Advanced Permissions feature"},
+ {"error": "Password management requires the Access Control feature"},
status=status.HTTP_403_FORBIDDEN,
)
@@ -554,9 +554,9 @@ class SharingConfigurationViewSet(TeamAndOrgViewSetMixin, mixins.ListModelMixin,
check_can_edit_sharing_configuration(self, request, sharing_config)
- if not self.organization.is_feature_available(AvailableFeature.ADVANCED_PERMISSIONS):
+ if not self.organization.is_feature_available(AvailableFeature.ACCESS_CONTROL):
return response.Response(
- {"error": "Password management requires the Advanced Permissions feature"},
+ {"error": "Password management requires the Access Control feature"},
status=status.HTTP_403_FORBIDDEN,
)
diff --git a/posthog/api/test/dashboards/test_dashboard.py b/posthog/api/test/dashboards/test_dashboard.py
index 032569f1744c..34cf25a806c8 100644
--- a/posthog/api/test/dashboards/test_dashboard.py
+++ b/posthog/api/test/dashboards/test_dashboard.py
@@ -72,8 +72,8 @@ class TestDashboard(APIBaseTest, QueryMatchingTest):
super().setUp()
self.organization.available_product_features = [
{
- "key": AvailableFeature.ADVANCED_PERMISSIONS,
- "name": AvailableFeature.ADVANCED_PERMISSIONS,
+ "key": AvailableFeature.ACCESS_CONTROL,
+ "name": AvailableFeature.ACCESS_CONTROL,
},
]
@@ -2136,7 +2136,7 @@ class TestDashboard(APIBaseTest, QueryMatchingTest):
@parameterized.expand([("source",), ("target",)])
def test_move_tile_respects_access_control(self, blocked_dashboard: str) -> None:
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS},
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL},
{"key": AvailableFeature.ROLE_BASED_ACCESS, "name": AvailableFeature.ROLE_BASED_ACCESS},
]
self.organization.save()
diff --git a/posthog/api/test/test_exports.py b/posthog/api/test/test_exports.py
index ca882647524d..05b0013972e9 100644
--- a/posthog/api/test/test_exports.py
+++ b/posthog/api/test/test_exports.py
@@ -685,7 +685,7 @@ class TestExports(APIBaseTest):
created_by=other_user,
)
- self.organization.available_product_features = [{"key": "advanced_permissions", "name": "Advanced permissions"}]
+ self.organization.available_product_features = [{"key": "access_control", "name": "Access control"}]
self.organization.save()
AccessControl.objects.create(
@@ -718,7 +718,7 @@ class TestExports(APIBaseTest):
created_by=other_user,
)
- self.organization.available_product_features = [{"key": "advanced_permissions", "name": "Advanced permissions"}]
+ self.organization.available_product_features = [{"key": "access_control", "name": "Access control"}]
self.organization.save()
AccessControl.objects.create(
@@ -783,7 +783,7 @@ class TestExports(APIBaseTest):
content=b"videobytes",
)
- self.organization.available_product_features = [{"key": "advanced_permissions", "name": "Advanced permissions"}]
+ self.organization.available_product_features = [{"key": "access_control", "name": "Access control"}]
self.organization.save()
AccessControl.objects.create(
@@ -825,7 +825,7 @@ class TestExports(APIBaseTest):
content=b"videobytes",
)
- self.organization.available_product_features = [{"key": "advanced_permissions", "name": "Advanced permissions"}]
+ self.organization.available_product_features = [{"key": "access_control", "name": "Access control"}]
self.organization.save()
AccessControl.objects.create(
diff --git a/posthog/api/test/test_feature_flag.py b/posthog/api/test/test_feature_flag.py
index a674aa98946e..88c56e3118eb 100644
--- a/posthog/api/test/test_feature_flag.py
+++ b/posthog/api/test/test_feature_flag.py
@@ -8564,7 +8564,7 @@ class TestFeatureFlag(APIBaseTest, ClickhouseTestMixin):
def test_feature_flag_detail_actions_respect_access_control(self) -> None:
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS},
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL},
{"key": AvailableFeature.ROLE_BASED_ACCESS, "name": AvailableFeature.ROLE_BASED_ACCESS},
]
self.organization.save()
@@ -8596,7 +8596,7 @@ class TestFeatureFlag(APIBaseTest, ClickhouseTestMixin):
# from the org (their AccessControl row cascade-deletes). Org admins should
# still be able to find such orphaned flags in the list endpoint.
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS},
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL},
{"key": AvailableFeature.ROLE_BASED_ACCESS, "name": AvailableFeature.ROLE_BASED_ACCESS},
]
self.organization.save()
@@ -8639,7 +8639,7 @@ class TestFeatureFlag(APIBaseTest, ClickhouseTestMixin):
# Counterpart to the test above: non-admin members without an explicit
# grant must still be filtered out by the per-object "none" default.
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS},
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL},
{"key": AvailableFeature.ROLE_BASED_ACCESS, "name": AvailableFeature.ROLE_BASED_ACCESS},
]
self.organization.save()
diff --git a/posthog/api/test/test_insight.py b/posthog/api/test/test_insight.py
index c6f347d058e8..4993ed7fe85d 100644
--- a/posthog/api/test/test_insight.py
+++ b/posthog/api/test/test_insight.py
@@ -4314,7 +4314,7 @@ class TestInsight(ClickhouseTestMixin, APIBaseTest, QueryMatchingTest):
def test_insight_activity_respects_access_control(self) -> None:
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS},
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL},
{"key": AvailableFeature.ROLE_BASED_ACCESS, "name": AvailableFeature.ROLE_BASED_ACCESS},
]
self.organization.save()
diff --git a/posthog/api/test/test_organization_feature_flag.py b/posthog/api/test/test_organization_feature_flag.py
index dca6f244bc19..5e0964455710 100644
--- a/posthog/api/test/test_organization_feature_flag.py
+++ b/posthog/api/test/test_organization_feature_flag.py
@@ -100,11 +100,11 @@ class TestOrganizationFeatureFlagGet(APIBaseTest, QueryMatchingTest):
"""Test that flags from teams the user cannot access are not returned."""
from posthog.constants import AvailableFeature
- # Enable advanced permissions for the organization
+ # Enable access control for the organization
self.organization.available_product_features = [
{
- "name": AvailableFeature.ADVANCED_PERMISSIONS,
- "key": AvailableFeature.ADVANCED_PERMISSIONS,
+ "name": AvailableFeature.ACCESS_CONTROL,
+ "key": AvailableFeature.ACCESS_CONTROL,
}
]
self.organization.save()
@@ -582,11 +582,11 @@ class TestOrganizationFeatureFlagCopy(APIBaseTest, QueryMatchingTest):
from ee.models.rbac.access_control import AccessControl
- # Enable advanced permissions for the organization
+ # Enable access control for the organization
self.organization.available_product_features = [
{
- "name": AvailableFeature.ADVANCED_PERMISSIONS,
- "key": AvailableFeature.ADVANCED_PERMISSIONS,
+ "name": AvailableFeature.ACCESS_CONTROL,
+ "key": AvailableFeature.ACCESS_CONTROL,
}
]
self.organization.save()
diff --git a/posthog/api/test/test_organization_invites.py b/posthog/api/test/test_organization_invites.py
index d1174558383f..9a37960e1f7c 100644
--- a/posthog/api/test/test_organization_invites.py
+++ b/posthog/api/test/test_organization_invites.py
@@ -34,7 +34,7 @@ class TestOrganizationInvitesAPI(APIBaseTest):
super().setUp()
self.organization.available_product_features = [
*(self.organization.available_product_features or []),
- {"key": AvailableFeature.ADVANCED_PERMISSIONS},
+ {"key": AvailableFeature.ACCESS_CONTROL},
]
self.organization.save()
@@ -1413,7 +1413,7 @@ class TestOrganizationInvitesAPI(APIBaseTest):
org_b = Organization.objects.create(name="Org B")
org_b.available_product_features = [
{"key": AvailableFeature.ORGANIZATION_INVITE_SETTINGS},
- {"key": AvailableFeature.ADVANCED_PERMISSIONS},
+ {"key": AvailableFeature.ACCESS_CONTROL},
]
org_b.members_can_invite = False
org_b.save()
@@ -1424,7 +1424,7 @@ class TestOrganizationInvitesAPI(APIBaseTest):
# Org A allows members to invite
self.organization.available_product_features = [
{"key": AvailableFeature.ORGANIZATION_INVITE_SETTINGS},
- {"key": AvailableFeature.ADVANCED_PERMISSIONS},
+ {"key": AvailableFeature.ACCESS_CONTROL},
]
self.organization.members_can_invite = True
self.organization.save()
diff --git a/posthog/api/test/test_share_password_api.py b/posthog/api/test/test_share_password_api.py
index 0eac237b0951..2746c9a3c9cc 100644
--- a/posthog/api/test/test_share_password_api.py
+++ b/posthog/api/test/test_share_password_api.py
@@ -15,11 +15,11 @@ from products.dashboards.backend.models.dashboard import Dashboard
class TestSharePasswordAPI(APIBaseTest):
def setUp(self):
super().setUp()
- # Enable advanced permissions feature for the organization
+ # Enable access control feature for the organization
self.organization.available_product_features = [
{
- "key": AvailableFeature.ADVANCED_PERMISSIONS,
- "name": AvailableFeature.ADVANCED_PERMISSIONS,
+ "key": AvailableFeature.ACCESS_CONTROL,
+ "name": AvailableFeature.ACCESS_CONTROL,
}
]
self.organization.save()
@@ -83,8 +83,8 @@ class TestSharePasswordAPI(APIBaseTest):
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
self.assertIn("Password protection must be enabled", response.json()["error"])
- def test_create_password_without_advanced_permissions(self):
- # Mock organization without advanced permissions
+ def test_create_password_without_access_control(self):
+ # Mock organization without access control
self.organization.available_product_features = []
self.organization.save()
@@ -95,7 +95,7 @@ class TestSharePasswordAPI(APIBaseTest):
)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
- self.assertIn("Advanced Permissions feature", response.json()["error"])
+ self.assertIn("Access Control feature", response.json()["error"])
def test_create_password_validation_too_short(self):
response = self.client.post(
@@ -134,12 +134,12 @@ class TestSharePasswordAPI(APIBaseTest):
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
self.assertIn("Password not found", response.json()["detail"])
- def test_delete_password_without_advanced_permissions(self):
+ def test_delete_password_without_access_control(self):
share_password, _ = SharePassword.create_password(
sharing_configuration=self.sharing_config, created_by=self.user, raw_password="test-password"
)
- # Mock organization without advanced permissions
+ # Mock organization without access control
self.organization.available_product_features = []
self.organization.save()
@@ -148,7 +148,7 @@ class TestSharePasswordAPI(APIBaseTest):
)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
- self.assertIn("Advanced Permissions feature", response.json()["error"])
+ self.assertIn("Access Control feature", response.json()["error"])
def test_password_validation_in_sharing_viewer(self):
"""Test that password validation works correctly in the sharing viewer."""
@@ -299,7 +299,7 @@ class TestSharePasswordAPI(APIBaseTest):
"""
# Enable white labelling feature for the organization
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS},
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL},
{"key": AvailableFeature.WHITE_LABELLING, "name": AvailableFeature.WHITE_LABELLING},
]
self.organization.save()
diff --git a/posthog/api/test/test_signup.py b/posthog/api/test/test_signup.py
index d108e798fe4a..f42f6ddadabd 100644
--- a/posthog/api/test/test_signup.py
+++ b/posthog/api/test/test_signup.py
@@ -2115,7 +2115,7 @@ class TestInviteSignupAPI(APIBaseTest):
)
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS}
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL}
]
self.organization.save()
@@ -2146,7 +2146,7 @@ class TestInviteSignupAPI(APIBaseTest):
# Create a separate organization with advanced permissions enabled
organization = Organization.objects.create(name="Test Organization")
organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS}
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL}
]
organization.save()
@@ -2178,7 +2178,7 @@ class TestInviteSignupAPI(APIBaseTest):
def test_api_invite_signup_invite_has_private_project_access(self):
self.client.logout()
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS}
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL}
]
self.organization.save()
private_project = Team.objects.create(name="Private project", organization=self.organization)
@@ -2218,7 +2218,7 @@ class TestInviteSignupAPI(APIBaseTest):
def test_api_invite_signup_private_project_access_team_no_longer_exists(self):
self.client.logout()
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS}
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL}
]
self.organization.save()
private_project = Team.objects.create(name="Private project", organization=self.organization)
diff --git a/posthog/api/test/test_team.py b/posthog/api/test/test_team.py
index 44fb85d6f3a9..2faa2340d6c2 100644
--- a/posthog/api/test/test_team.py
+++ b/posthog/api/test/test_team.py
@@ -2979,8 +2979,8 @@ class TestTeamAPI(team_api_test_factory()): # type: ignore
self.organization.available_product_features = [
{
- "key": AvailableFeature.ADVANCED_PERMISSIONS,
- "name": AvailableFeature.ADVANCED_PERMISSIONS,
+ "key": AvailableFeature.ACCESS_CONTROL,
+ "name": AvailableFeature.ACCESS_CONTROL,
},
]
self.organization.save()
@@ -3014,8 +3014,8 @@ class TestTeamAPI(team_api_test_factory()): # type: ignore
self.organization.available_product_features = [
{
- "key": AvailableFeature.ADVANCED_PERMISSIONS,
- "name": AvailableFeature.ADVANCED_PERMISSIONS,
+ "key": AvailableFeature.ACCESS_CONTROL,
+ "name": AvailableFeature.ACCESS_CONTROL,
},
]
self.organization.save()
@@ -3045,8 +3045,8 @@ class TestTeamAPI(team_api_test_factory()): # type: ignore
self.organization.available_product_features = [
{
- "key": AvailableFeature.ADVANCED_PERMISSIONS,
- "name": AvailableFeature.ADVANCED_PERMISSIONS,
+ "key": AvailableFeature.ACCESS_CONTROL,
+ "name": AvailableFeature.ACCESS_CONTROL,
},
]
self.organization.save()
@@ -3072,8 +3072,8 @@ class TestTeamAPI(team_api_test_factory()): # type: ignore
self.organization.available_product_features = [
{
- "key": AvailableFeature.ADVANCED_PERMISSIONS,
- "name": AvailableFeature.ADVANCED_PERMISSIONS,
+ "key": AvailableFeature.ACCESS_CONTROL,
+ "name": AvailableFeature.ACCESS_CONTROL,
},
]
self.organization.save()
@@ -3106,8 +3106,8 @@ class TestTeamAPI(team_api_test_factory()): # type: ignore
self.organization.available_product_features = [
{
- "key": AvailableFeature.ADVANCED_PERMISSIONS,
- "name": AvailableFeature.ADVANCED_PERMISSIONS,
+ "key": AvailableFeature.ACCESS_CONTROL,
+ "name": AvailableFeature.ACCESS_CONTROL,
},
]
self.organization.save()
@@ -3136,8 +3136,8 @@ class TestTeamAPI(team_api_test_factory()): # type: ignore
self.organization.available_product_features = [
{
- "key": AvailableFeature.ADVANCED_PERMISSIONS,
- "name": AvailableFeature.ADVANCED_PERMISSIONS,
+ "key": AvailableFeature.ACCESS_CONTROL,
+ "name": AvailableFeature.ACCESS_CONTROL,
},
]
self.organization.save()
diff --git a/posthog/hogql/printer/test/test_hogql_access_control.py b/posthog/hogql/printer/test/test_hogql_access_control.py
index 4ec01087ac88..1f9a3432a496 100644
--- a/posthog/hogql/printer/test/test_hogql_access_control.py
+++ b/posthog/hogql/printer/test/test_hogql_access_control.py
@@ -93,9 +93,9 @@ class TestDeniedTableError(BaseTest):
from ee.models import AccessControl
- # Enable advanced permissions feature
+ # Enable access control feature
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS},
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL},
]
self.organization.save()
diff --git a/posthog/hogql_queries/web_analytics/test/test_web_analytics_rbac.py b/posthog/hogql_queries/web_analytics/test/test_web_analytics_rbac.py
index a2c4f1af5457..831475044bab 100644
--- a/posthog/hogql_queries/web_analytics/test/test_web_analytics_rbac.py
+++ b/posthog/hogql_queries/web_analytics/test/test_web_analytics_rbac.py
@@ -25,7 +25,7 @@ class TestWebAnalyticsRBAC(APIBaseTest):
def test_validate_query_runner_access_with_editor(self):
AccessControl.objects.create(team=self.team, resource="web_analytics", access_level="editor")
- self.organization.available_product_features.append({"key": AvailableFeature.ADVANCED_PERMISSIONS}) # type: ignore[union-attr]
+ self.organization.available_product_features.append({"key": AvailableFeature.ACCESS_CONTROL}) # type: ignore[union-attr]
self.organization.save()
query = WebOverviewQuery(
@@ -38,7 +38,7 @@ class TestWebAnalyticsRBAC(APIBaseTest):
def test_validate_query_runner_access_without_access(self):
AccessControl.objects.create(team=self.team, resource="web_analytics", access_level="none")
- self.organization.available_product_features.append({"key": AvailableFeature.ADVANCED_PERMISSIONS}) # type: ignore[union-attr]
+ self.organization.available_product_features.append({"key": AvailableFeature.ACCESS_CONTROL}) # type: ignore[union-attr]
self.organization.save()
query = WebOverviewQuery(
@@ -52,7 +52,7 @@ class TestWebAnalyticsRBAC(APIBaseTest):
def test_validate_query_runner_access_with_manager(self):
AccessControl.objects.create(team=self.team, resource="web_analytics", access_level="manager")
- self.organization.available_product_features.append({"key": AvailableFeature.ADVANCED_PERMISSIONS}) # type: ignore[union-attr]
+ self.organization.available_product_features.append({"key": AvailableFeature.ACCESS_CONTROL}) # type: ignore[union-attr]
self.organization.save()
query = WebOverviewQuery(
diff --git a/posthog/models/test/test_organization_model.py b/posthog/models/test/test_organization_model.py
index c585e41f8198..75624651f446 100644
--- a/posthog/models/test/test_organization_model.py
+++ b/posthog/models/test/test_organization_model.py
@@ -127,7 +127,6 @@ class TestOrganization(BaseTest):
[{"key": "recordings_file_export"}, {"key": "role_based_access"}],
"enterprise",
),
- ("advanced_permissions_flags_enterprise", [{"key": "advanced_permissions"}], "enterprise"),
("access_control_flags_enterprise", [{"key": "access_control"}], "enterprise"),
("saml_flags_enterprise", [{"key": "saml"}], "enterprise"),
("scim_flags_enterprise", [{"key": "scim"}], "enterprise"),
diff --git a/posthog/models/test/test_user_model.py b/posthog/models/test/test_user_model.py
index 3cbe57ca8f1f..49dbfc14980f 100644
--- a/posthog/models/test/test_user_model.py
+++ b/posthog/models/test/test_user_model.py
@@ -91,11 +91,9 @@ class TestUser(BaseTest):
)
def test_join_with_new_access_control_sets_allowed_team(self):
- # Org WITH ADVANCED_PERMISSIONS
+ # Org WITH ACCESS_CONTROL
org = Organization.objects.create(name="RBAC Org")
- org.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": "Advanced permissions"}
- ]
+ org.available_product_features = [{"key": AvailableFeature.ACCESS_CONTROL, "name": "Access control"}]
org.save()
t1 = Team.objects.create(organization=org, name="T1")
@@ -114,9 +112,7 @@ class TestUser(BaseTest):
def test_join_admin_prefers_first_project_even_with_rbac(self):
# Admins bypass RBAC filtering
org = Organization.objects.create(name="Admin Org")
- org.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": "Advanced permissions"}
- ]
+ org.available_product_features = [{"key": AvailableFeature.ACCESS_CONTROL, "name": "Access control"}]
org.save()
t1 = Team.objects.create(organization=org, name="T1")
diff --git a/posthog/models/test/test_user_teams_access_control.py b/posthog/models/test/test_user_teams_access_control.py
index 615e6df9c554..314aa986428b 100644
--- a/posthog/models/test/test_user_teams_access_control.py
+++ b/posthog/models/test/test_user_teams_access_control.py
@@ -18,15 +18,15 @@ class TestUserTeamsAccessControl(BaseTest):
def setUp(self):
super().setUp()
- # Enable advanced permissions for the organization
+ # Enable access control for the organization
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS}
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL}
]
self.organization.save()
- def test_user_teams_without_advanced_permissions(self):
- """Test that without advanced permissions, user sees all teams in their organization."""
- # Disable advanced permissions
+ def test_user_teams_without_access_control(self):
+ """Test that without access control, user sees all teams in their organization."""
+ # Disable access control
self.organization.available_product_features = []
self.organization.save()
diff --git a/posthog/models/user.py b/posthog/models/user.py
index 58afb83f3afd..a744db30cb3c 100644
--- a/posthog/models/user.py
+++ b/posthog/models/user.py
@@ -302,7 +302,7 @@ class User(AbstractUser, UUIDTClassicModel, ModelActivityMixin): # type: ignore
)
if org_available_product_features and len(org_available_product_features) > 0:
org_available_product_feature_keys = [feature["key"] for feature in org_available_product_features]
- if AvailableFeature.ADVANCED_PERMISSIONS in org_available_product_feature_keys:
+ if AvailableFeature.ACCESS_CONTROL in org_available_product_feature_keys:
try:
from ee.models.rbac.access_control import AccessControl
except ImportError:
@@ -463,7 +463,7 @@ class User(AbstractUser, UUIDTClassicModel, ModelActivityMixin): # type: ignore
membership = OrganizationMembership.objects.create(user=self, organization=organization, level=level)
self.current_organization = organization
- if not organization.is_feature_available(AvailableFeature.ADVANCED_PERMISSIONS):
+ if not organization.is_feature_available(AvailableFeature.ACCESS_CONTROL):
# If project access control is NOT applicable, simply prefer open projects just in case
self.current_team = organization.teams.order_by("id").first()
else:
diff --git a/posthog/rbac/migrations/test/test_rbac_dashboard_migration.py b/posthog/rbac/migrations/test/test_rbac_dashboard_migration.py
index 87158ca4ac9e..59efe4f153b7 100644
--- a/posthog/rbac/migrations/test/test_rbac_dashboard_migration.py
+++ b/posthog/rbac/migrations/test/test_rbac_dashboard_migration.py
@@ -20,11 +20,11 @@ except ImportError:
class TestRBACDashboardMigration(BaseTest):
def setUp(self):
super().setUp()
- # Enable advanced permissions for the organization
+ # Enable access control for the organization
self.organization.available_product_features = [
{
- "key": AvailableFeature.ADVANCED_PERMISSIONS,
- "name": AvailableFeature.ADVANCED_PERMISSIONS,
+ "key": AvailableFeature.ACCESS_CONTROL,
+ "name": AvailableFeature.ACCESS_CONTROL,
},
]
self.organization.save()
diff --git a/posthog/rbac/test/test_user_access_control.py b/posthog/rbac/test/test_user_access_control.py
index 4982b2f1d006..3e6b4c57c6c6 100644
--- a/posthog/rbac/test/test_user_access_control.py
+++ b/posthog/rbac/test/test_user_access_control.py
@@ -52,8 +52,8 @@ class BaseUserAccessControlTest(BaseTest):
super().setUp()
self.organization.available_product_features = [
{
- "key": AvailableFeature.ADVANCED_PERMISSIONS,
- "name": AvailableFeature.ADVANCED_PERMISSIONS,
+ "key": AvailableFeature.ACCESS_CONTROL,
+ "name": AvailableFeature.ACCESS_CONTROL,
},
{
"key": AvailableFeature.ROLE_BASED_ACCESS,
@@ -369,9 +369,9 @@ class TestUserAccessControlFileSystem(BaseUserAccessControlTest):
def setUp(self):
super().setUp()
- # Enable advanced permissions & role-based access for tests
+ # Enable access control & role-based access for tests
self.organization.available_product_features = [
- {"key": "advanced_permissions", "name": "advanced_permissions"},
+ {"key": "access_control", "name": "access_control"},
{"key": "role_based_access", "name": "sso_enforcement"},
]
self.organization.save()
diff --git a/posthog/rbac/user_access_control.py b/posthog/rbac/user_access_control.py
index dd559bc5cb5b..924419788238 100644
--- a/posthog/rbac/user_access_control.py
+++ b/posthog/rbac/user_access_control.py
@@ -373,7 +373,7 @@ class UserAccessControl:
if not self._organization:
return False
- return self._organization.is_feature_available(AvailableFeature.ADVANCED_PERMISSIONS)
+ return self._organization.is_feature_available(AvailableFeature.ACCESS_CONTROL)
# ------------------------------------------------------------
# Access control helpers
diff --git a/posthog/session_recordings/test/test_session_recording_access_control.py b/posthog/session_recordings/test/test_session_recording_access_control.py
index 24543718558b..d6dc18b9ab22 100644
--- a/posthog/session_recordings/test/test_session_recording_access_control.py
+++ b/posthog/session_recordings/test/test_session_recording_access_control.py
@@ -27,8 +27,8 @@ class TestSessionRecordingAccessControl(APIBaseTest):
# Enable access control features
self.organization.available_product_features = [
{
- "key": AvailableFeature.ADVANCED_PERMISSIONS,
- "name": AvailableFeature.ADVANCED_PERMISSIONS,
+ "key": AvailableFeature.ACCESS_CONTROL,
+ "name": AvailableFeature.ACCESS_CONTROL,
},
{
"key": AvailableFeature.ROLE_BASED_ACCESS,
diff --git a/posthog/test/playwright_setup_functions.py b/posthog/test/playwright_setup_functions.py
index 4fed4f7a8c8c..43bdc389c9f5 100644
--- a/posthog/test/playwright_setup_functions.py
+++ b/posthog/test/playwright_setup_functions.py
@@ -186,11 +186,11 @@ def create_organization_with_team(
# Bypass billing quota limits so insights always compute on CI
organization.never_drop_data = True
- # Add advanced permissions feature for password-protected sharing
+ # Add access control feature for password-protected sharing
organization.available_product_features = [
{
- "key": AvailableFeature.ADVANCED_PERMISSIONS,
- "name": AvailableFeature.ADVANCED_PERMISSIONS,
+ "key": AvailableFeature.ACCESS_CONTROL,
+ "name": AvailableFeature.ACCESS_CONTROL,
}
]
organization.save()
diff --git a/posthog/test/test_permissions.py b/posthog/test/test_permissions.py
index ae971a52bcaf..0009602317eb 100644
--- a/posthog/test/test_permissions.py
+++ b/posthog/test/test_permissions.py
@@ -38,8 +38,8 @@ class TestAccessControlPermission(BaseTest):
super().setUp()
self.organization.available_product_features = [
{
- "key": AvailableFeature.ADVANCED_PERMISSIONS,
- "name": AvailableFeature.ADVANCED_PERMISSIONS,
+ "key": AvailableFeature.ACCESS_CONTROL,
+ "name": AvailableFeature.ACCESS_CONTROL,
},
{
"key": AvailableFeature.ROLE_BASED_ACCESS,
diff --git a/posthog/test/test_user_permissions.py b/posthog/test/test_user_permissions.py
index f67418966b5b..1eaf9acc2c79 100644
--- a/posthog/test/test_user_permissions.py
+++ b/posthog/test/test_user_permissions.py
@@ -26,8 +26,8 @@ class TestUserTeamPermissions(BaseTest, WithPermissionsBase):
super().setUp()
self.organization.available_product_features = [
{
- "name": AvailableFeature.ADVANCED_PERMISSIONS,
- "key": AvailableFeature.ADVANCED_PERMISSIONS,
+ "name": AvailableFeature.ACCESS_CONTROL,
+ "key": AvailableFeature.ACCESS_CONTROL,
}
]
self.organization.save()
@@ -448,7 +448,7 @@ class TestUserDashboardPermissions(BaseTest, WithPermissionsBase):
def setUp(self):
super().setUp()
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS}
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL}
]
self.organization.save()
self.dashboard = Dashboard.objects.create(team=self.team)
@@ -605,7 +605,7 @@ class TestUserInsightPermissions(BaseTest, WithPermissionsBase):
def setUp(self):
super().setUp()
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS}
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL}
]
self.organization.save()
@@ -689,7 +689,7 @@ class TestUserInsightPermissions(BaseTest, WithPermissionsBase):
class TestUserPermissionsEfficiency(BaseTest, WithPermissionsBase):
def test_dashboard_efficiency(self):
self.organization.available_product_features = [
- {"name": AvailableFeature.ADVANCED_PERMISSIONS, "key": AvailableFeature.ADVANCED_PERMISSIONS},
+ {"name": AvailableFeature.ACCESS_CONTROL, "key": AvailableFeature.ACCESS_CONTROL},
]
self.organization.save()
diff --git a/posthog/user_permissions.py b/posthog/user_permissions.py
index 8765a2fc72ae..dfe22c65078b 100644
--- a/posthog/user_permissions.py
+++ b/posthog/user_permissions.py
@@ -194,7 +194,7 @@ class UserTeamPermissions:
if organization is None or organization_membership is None:
return None
- if not organization.is_feature_available(AvailableFeature.ADVANCED_PERMISSIONS):
+ if not organization.is_feature_available(AvailableFeature.ACCESS_CONTROL):
return cast("OrganizationMembership.Level", organization_membership.level)
# Use prefetched data to check team privacy and access
@@ -286,9 +286,7 @@ class UserDashboardPermissions:
def effective_restriction_level(self) -> Dashboard.RestrictionLevel:
return (
Dashboard.RestrictionLevel(self.dashboard.restriction_level)
- if cast(Organization, self.p.current_organization).is_feature_available(
- AvailableFeature.ADVANCED_PERMISSIONS
- )
+ if cast(Organization, self.p.current_organization).is_feature_available(AvailableFeature.ACCESS_CONTROL)
else Dashboard.RestrictionLevel.EVERYONE_IN_PROJECT_CAN_EDIT
)
diff --git a/products/customer_analytics/backend/api/test_views.py b/products/customer_analytics/backend/api/test_views.py
index 1ba5b2b27edf..e498a820e702 100644
--- a/products/customer_analytics/backend/api/test_views.py
+++ b/products/customer_analytics/backend/api/test_views.py
@@ -399,8 +399,8 @@ class TestCustomerAnalyticsAccessControl(APIBaseTest):
self.organization.available_product_features = [
{
- "key": AvailableFeature.ADVANCED_PERMISSIONS,
- "name": AvailableFeature.ADVANCED_PERMISSIONS,
+ "key": AvailableFeature.ACCESS_CONTROL,
+ "name": AvailableFeature.ACCESS_CONTROL,
},
{
"key": AvailableFeature.ROLE_BASED_ACCESS,
diff --git a/products/dashboards/backend/api/test/test_dashboard_templates.py b/products/dashboards/backend/api/test/test_dashboard_templates.py
index 40cb2e5d0a07..318b075563da 100644
--- a/products/dashboards/backend/api/test/test_dashboard_templates.py
+++ b/products/dashboards/backend/api/test/test_dashboard_templates.py
@@ -950,7 +950,7 @@ class TestCustomerDashboardTemplateAuthoring(APIBaseTest):
self.user.save()
ensure_baseline_global_dashboard_templates()
self.organization.available_product_features = [
- {"name": AvailableFeature.ADVANCED_PERMISSIONS, "key": AvailableFeature.ADVANCED_PERMISSIONS},
+ {"name": AvailableFeature.ACCESS_CONTROL, "key": AvailableFeature.ACCESS_CONTROL},
]
self.organization.save()
@@ -1322,7 +1322,7 @@ class TestCustomerDashboardTemplateCopyBetweenProjects(APIBaseTest):
self.user.save()
ensure_baseline_global_dashboard_templates()
self.organization.available_product_features = [
- {"name": AvailableFeature.ADVANCED_PERMISSIONS, "key": AvailableFeature.ADVANCED_PERMISSIONS},
+ {"name": AvailableFeature.ACCESS_CONTROL, "key": AvailableFeature.ACCESS_CONTROL},
]
self.organization.save()
self.team_b = Team.objects.create(organization=self.organization, name="Customer copy target")
diff --git a/products/data_warehouse/backend/api/test/_access_control_base.py b/products/data_warehouse/backend/api/test/_access_control_base.py
index 1cd3dc003b84..aa6e70458159 100644
--- a/products/data_warehouse/backend/api/test/_access_control_base.py
+++ b/products/data_warehouse/backend/api/test/_access_control_base.py
@@ -30,7 +30,7 @@ class WarehouseAccessControlTestMixin(APIBaseTest):
super().setUp()
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS},
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL},
{"key": AvailableFeature.ROLE_BASED_ACCESS, "name": AvailableFeature.ROLE_BASED_ACCESS},
]
self.organization.save()
diff --git a/products/data_warehouse/backend/api/test/test_external_data_source_access_control.py b/products/data_warehouse/backend/api/test/test_external_data_source_access_control.py
index 1e6cae41960e..ac67abf4d9f6 100644
--- a/products/data_warehouse/backend/api/test/test_external_data_source_access_control.py
+++ b/products/data_warehouse/backend/api/test/test_external_data_source_access_control.py
@@ -27,8 +27,8 @@ class TestExternalDataSourceAccessControl(APIBaseTest):
# Enable access control features
self.organization.available_product_features = [
{
- "key": AvailableFeature.ADVANCED_PERMISSIONS,
- "name": AvailableFeature.ADVANCED_PERMISSIONS,
+ "key": AvailableFeature.ACCESS_CONTROL,
+ "name": AvailableFeature.ACCESS_CONTROL,
},
{
"key": AvailableFeature.ROLE_BASED_ACCESS,
diff --git a/products/deployments/backend/test/test_deployments_api.py b/products/deployments/backend/test/test_deployments_api.py
index b2099dba6f5b..fc5db1f37c0c 100644
--- a/products/deployments/backend/test/test_deployments_api.py
+++ b/products/deployments/backend/test/test_deployments_api.py
@@ -50,14 +50,14 @@ class _BaseDeploymentsAPITest(DeploymentsTeamScopedTestMixin, APIBaseTest):
class TestDeploymentProjectsAPI(_BaseDeploymentsAPITest):
- def _enable_advanced_permissions(self) -> None:
+ def _enable_access_control(self) -> None:
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS}
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL}
]
self.organization.save(update_fields=["available_product_features"])
def _restrict_integrations_resource(self) -> None:
- self._enable_advanced_permissions()
+ self._enable_access_control()
AccessControl.objects.create(
team=self.team,
resource="integration",
@@ -66,7 +66,7 @@ class TestDeploymentProjectsAPI(_BaseDeploymentsAPITest):
)
def _restrict_integration(self, integration: Integration) -> None:
- self._enable_advanced_permissions()
+ self._enable_access_control()
AccessControl.objects.create(
team=self.team,
resource="integration",
diff --git a/products/live_debugger/backend/test_api.py b/products/live_debugger/backend/test_api.py
index 72d96cc60f6f..d406d9fd23ff 100644
--- a/products/live_debugger/backend/test_api.py
+++ b/products/live_debugger/backend/test_api.py
@@ -818,7 +818,7 @@ class TestLiveDebuggerBreakpointAPI(APIBaseTest):
from ee.models.rbac.access_control import AccessControl
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS}
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL}
]
self.organization.save()
@@ -862,7 +862,7 @@ class TestLiveDebuggerBreakpointAPI(APIBaseTest):
from ee.models.rbac.access_control import AccessControl
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS}
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL}
]
self.organization.save()
@@ -912,7 +912,7 @@ class TestLiveDebuggerBreakpointAPI(APIBaseTest):
from ee.models.rbac.access_control import AccessControl
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS}
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL}
]
self.organization.save()
diff --git a/products/llm_analytics/backend/api/test/test_llm_analytics_access_control.py b/products/llm_analytics/backend/api/test/test_llm_analytics_access_control.py
index d05ee5c2f13d..93383da07d45 100644
--- a/products/llm_analytics/backend/api/test/test_llm_analytics_access_control.py
+++ b/products/llm_analytics/backend/api/test/test_llm_analytics_access_control.py
@@ -40,8 +40,8 @@ class TestLLMAnalyticsAccessControl(APIBaseTest):
self.organization.available_product_features = [
{
- "key": AvailableFeature.ADVANCED_PERMISSIONS,
- "name": AvailableFeature.ADVANCED_PERMISSIONS,
+ "key": AvailableFeature.ACCESS_CONTROL,
+ "name": AvailableFeature.ACCESS_CONTROL,
},
{
"key": AvailableFeature.ROLE_BASED_ACCESS,
diff --git a/products/notifications/backend/tests/test_logic.py b/products/notifications/backend/tests/test_logic.py
index 204206df6cf1..eec22920b8cc 100644
--- a/products/notifications/backend/tests/test_logic.py
+++ b/products/notifications/backend/tests/test_logic.py
@@ -235,7 +235,7 @@ class TestAccessControlFiltering(BaseTest):
self.user2 = User.objects.create_and_join(self.organization, "[email protected]", "password")
self.resolver = RecipientsResolver()
- def test_passthrough_when_org_lacks_advanced_permissions(self):
+ def test_passthrough_when_org_lacks_access_control(self):
self.organization.available_product_features = []
self.organization.save()
@@ -261,7 +261,7 @@ class TestAccessControlFiltering(BaseTest):
@patch("products.notifications.backend.resolvers.UserAccessControl")
def test_excludes_users_without_access(self, mock_uac_cls):
- self.organization.available_product_features = [{"key": AvailableFeature.ADVANCED_PERMISSIONS}]
+ self.organization.available_product_features = [{"key": AvailableFeature.ACCESS_CONTROL}]
self.organization.save()
allowed_user_id = self.user.id
diff --git a/products/revenue_analytics/backend/hogql_queries/test/test_revenue_analytics_query_runner.py b/products/revenue_analytics/backend/hogql_queries/test/test_revenue_analytics_query_runner.py
index 46b634b25f36..b9ca9eab38c3 100644
--- a/products/revenue_analytics/backend/hogql_queries/test/test_revenue_analytics_query_runner.py
+++ b/products/revenue_analytics/backend/hogql_queries/test/test_revenue_analytics_query_runner.py
@@ -342,7 +342,7 @@ class TestRevenueAnalyticsQueryRunner(APIBaseTest):
def test_validate_query_runner_access_without_access(self):
"""Test that the query runner cannot access the query runner without view access control"""
AccessControl.objects.create(team=self.team, resource="revenue_analytics", access_level="none")
- self.organization.available_product_features.append({"key": AvailableFeature.ADVANCED_PERMISSIONS}) # type: ignore[union-attr]
+ self.organization.available_product_features.append({"key": AvailableFeature.ACCESS_CONTROL}) # type: ignore[union-attr]
self.organization.save()
runner = RevenueAnalyticsQueryRunnerImpl(team=self.team, query=self.query)
diff --git a/products/surveys/backend/api/test/test_survey.py b/products/surveys/backend/api/test/test_survey.py
index 9ae82c0d2402..5c0938cd6da4 100644
--- a/products/surveys/backend/api/test/test_survey.py
+++ b/products/surveys/backend/api/test/test_survey.py
@@ -2984,7 +2984,7 @@ class TestSurvey(APIBaseTest):
def test_survey_activity_respects_access_control(self) -> None:
self.organization.available_product_features = [
- {"key": AvailableFeature.ADVANCED_PERMISSIONS, "name": AvailableFeature.ADVANCED_PERMISSIONS},
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL},
{"key": AvailableFeature.ROLE_BASED_ACCESS, "name": AvailableFeature.ROLE_BASED_ACCESS},
]
self.organization.save()