From 1fff8e0bbcbc621516eec6137a67b437bbe7793b Mon Sep 17 00:00:00 2001 From: andrewwallacespeckle Date: Tue, 3 Jun 2025 15:49:55 +0200 Subject: [PATCH] Add isPaidPlan --- .../settings/workspaces/security/DefaultSeat.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/frontend-2/components/settings/workspaces/security/DefaultSeat.vue b/packages/frontend-2/components/settings/workspaces/security/DefaultSeat.vue index 8f3ba2b89..a7f081ed5 100644 --- a/packages/frontend-2/components/settings/workspaces/security/DefaultSeat.vue +++ b/packages/frontend-2/components/settings/workspaces/security/DefaultSeat.vue @@ -63,6 +63,7 @@ import type { import { SeatTypes } from '@speckle/shared' import { workspaceUpdateDefaultSeatTypeMutation } from '~/lib/workspaces/graphql/mutations' import { useMixpanel } from '~/lib/core/composables/mp' +import { useWorkspacePlan } from '~/lib/workspaces/composables/plan' const props = defineProps<{ workspace: SettingsWorkspacesSecurity_WorkspaceFragment @@ -73,6 +74,7 @@ const { mutate: updateDefaultSeatType } = useMutation( workspaceUpdateDefaultSeatTypeMutation ) const { triggerNotification } = useGlobalToast() +const { isPaidPlan } = useWorkspacePlan(props.workspace.slug) const currentSeatType = ref(props.workspace.defaultSeatType) @@ -89,8 +91,12 @@ const seatTypeModel = computed({ const handleSeatTypeChange = (newValue: WorkspaceSeatType) => { if (newValue === currentSeatType.value) return - // If setting to Editor with auto-join enabled, show confirmation - if (newValue === SeatTypes.Editor && props.workspace.discoverabilityAutoJoinEnabled) { + // If setting to Editor with auto-join enabled on paid plan, show confirmation + if ( + newValue === SeatTypes.Editor && + props.workspace.discoverabilityAutoJoinEnabled && + isPaidPlan + ) { pendingNewSeatType.value = newValue showConfirmSeatTypeDialog.value = true return