Skip to content

Commit

Permalink
add some user_access_level types
Browse files Browse the repository at this point in the history
  • Loading branch information
zlwaterfield committed Dec 4, 2024
1 parent c5056ee commit 68358a2
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions frontend/src/lib/api.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const REGULAR_FEATURE_FLAG: FeatureFlagType = {
rollback_conditions: [],
performed_rollback: false,
can_edit: true,
user_access_level: 'editor',
tags: [],
surveys: [],
}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/scenes/feature-flags/activityDescriptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/scenes/feature-flags/featureFlagLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const NEW_FLAG: FeatureFlagType = {
surveys: null,
performed_rollback: false,
can_edit: true,
user_access_level: 'editor',
tags: [],
}
const NEW_VARIANT = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
}

Expand Down
1 change: 1 addition & 0 deletions frontend/src/scenes/notebooks/Notebook/notebookLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ export const notebookLogic = kea<notebookLogicType>([
content: null,
text_content: null,
version: 0,
user_access_level: 'editor',
}
} else if (props.shortId.startsWith('template-')) {
response =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions frontend/src/scenes/teamActivityDescriber.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down

0 comments on commit 68358a2

Please sign in to comment.