diff --git a/frontend/src/lib/api.mock.ts b/frontend/src/lib/api.mock.ts index 0dacdcfa74554..e6dac16290e92 100644 --- a/frontend/src/lib/api.mock.ts +++ b/frontend/src/lib/api.mock.ts @@ -84,6 +84,7 @@ export const MOCK_DEFAULT_TEAM: TeamType = { autocapture_web_vitals_opt_in: false, autocapture_exceptions_errors_to_ignore: [], effective_membership_level: OrganizationMembershipLevel.Admin, + user_access_level: 'admin', access_control: true, has_group_types: true, primary_dashboard: 1, diff --git a/frontend/src/scenes/feature-flags/FeatureFlagCodeInstructions.stories.tsx b/frontend/src/scenes/feature-flags/FeatureFlagCodeInstructions.stories.tsx index 0c5bc5df8edff..2878e8887e4c8 100644 --- a/frontend/src/scenes/feature-flags/FeatureFlagCodeInstructions.stories.tsx +++ b/frontend/src/scenes/feature-flags/FeatureFlagCodeInstructions.stories.tsx @@ -29,6 +29,7 @@ const REGULAR_FEATURE_FLAG: FeatureFlagType = { rollback_conditions: [], performed_rollback: false, can_edit: true, + user_access_level: 'editor', tags: [], surveys: [], } diff --git a/frontend/src/scenes/feature-flags/activityDescriptions.tsx b/frontend/src/scenes/feature-flags/activityDescriptions.tsx index 93fec0692b0c3..a85f73cde21ad 100644 --- a/frontend/src/scenes/feature-flags/activityDescriptions.tsx +++ b/frontend/src/scenes/feature-flags/activityDescriptions.tsx @@ -252,6 +252,7 @@ const featureFlagActionsMapping: Record< analytics_dashboards: () => null, has_enriched_analytics: () => null, surveys: () => null, + user_access_level: () => null, } export function flagActivityDescriber(logItem: ActivityLogItem, asNotification?: boolean): HumanizedChange { diff --git a/frontend/src/scenes/feature-flags/featureFlagLogic.ts b/frontend/src/scenes/feature-flags/featureFlagLogic.ts index 48889df0f3d63..3f73931970c85 100644 --- a/frontend/src/scenes/feature-flags/featureFlagLogic.ts +++ b/frontend/src/scenes/feature-flags/featureFlagLogic.ts @@ -96,6 +96,7 @@ const NEW_FLAG: FeatureFlagType = { surveys: null, performed_rollback: false, can_edit: true, + user_access_level: 'editor', tags: [], } const NEW_VARIANT = { diff --git a/frontend/src/scenes/notebooks/Notebook/__mocks__/notebook-template-for-snapshot.ts b/frontend/src/scenes/notebooks/Notebook/__mocks__/notebook-template-for-snapshot.ts index 175647c05a7a6..e1cdf46446ef8 100644 --- a/frontend/src/scenes/notebooks/Notebook/__mocks__/notebook-template-for-snapshot.ts +++ b/frontend/src/scenes/notebooks/Notebook/__mocks__/notebook-template-for-snapshot.ts @@ -14,6 +14,7 @@ export const notebookTestTemplate = ( last_modified_at: '2023-06-02T00:00:00Z', created_by: MOCK_DEFAULT_BASIC_USER, last_modified_by: MOCK_DEFAULT_BASIC_USER, + user_access_level: 'editor' as const, version: 1, content: { type: 'doc', diff --git a/frontend/src/scenes/notebooks/Notebook/migrations/migrate.test.ts b/frontend/src/scenes/notebooks/Notebook/migrations/migrate.test.ts index d1409e1716f6d..2dd7b6aa1915d 100644 --- a/frontend/src/scenes/notebooks/Notebook/migrations/migrate.test.ts +++ b/frontend/src/scenes/notebooks/Notebook/migrations/migrate.test.ts @@ -933,10 +933,12 @@ describe('migrate()', () => { it.each(contentToExpected)('migrates %s', (_name, prevContent, nextContent) => { const prevNotebook: NotebookType = { ...mockNotebook, + user_access_level: 'editor' as const, content: { type: 'doc', content: prevContent }, } const nextNotebook: NotebookType = { ...mockNotebook, + user_access_level: 'editor' as const, content: { type: 'doc', content: nextContent }, } diff --git a/frontend/src/scenes/notebooks/Notebook/notebookLogic.ts b/frontend/src/scenes/notebooks/Notebook/notebookLogic.ts index 5b9396ecdc94b..bc0593c22bff3 100644 --- a/frontend/src/scenes/notebooks/Notebook/notebookLogic.ts +++ b/frontend/src/scenes/notebooks/Notebook/notebookLogic.ts @@ -232,6 +232,7 @@ export const notebookLogic = kea([ content: null, text_content: null, version: 0, + user_access_level: 'editor', } } else if (props.shortId.startsWith('template-')) { response = diff --git a/frontend/src/scenes/notebooks/NotebookTemplates/notebookTemplates.ts b/frontend/src/scenes/notebooks/NotebookTemplates/notebookTemplates.ts index f1c63fe133674..7206f48eaf4a4 100644 --- a/frontend/src/scenes/notebooks/NotebookTemplates/notebookTemplates.ts +++ b/frontend/src/scenes/notebooks/NotebookTemplates/notebookTemplates.ts @@ -19,6 +19,7 @@ export const LOCAL_NOTEBOOK_TEMPLATES: NotebookType[] = [ last_modified_at: '2023-06-02T00:00:00Z', created_by: TEMPLATE_USERS.posthog, last_modified_by: TEMPLATE_USERS.posthog, + user_access_level: 'viewer' as const, version: 1, content: { type: 'doc', diff --git a/frontend/src/scenes/teamActivityDescriber.tsx b/frontend/src/scenes/teamActivityDescriber.tsx index bc08596af9a23..4bde2cf4d8e50 100644 --- a/frontend/src/scenes/teamActivityDescriber.tsx +++ b/frontend/src/scenes/teamActivityDescriber.tsx @@ -362,6 +362,7 @@ const teamActionsMapping: Record< id: () => null, updated_at: () => null, uuid: () => null, + user_access_level: () => null, live_events_token: () => null, product_intents: () => null, }