diff --git a/apps/docs/app/global/access-roles/page.mdx b/apps/docs/app/global/access-roles/page.mdx index 834959ff21..edacf86469 100644 --- a/apps/docs/app/global/access-roles/page.mdx +++ b/apps/docs/app/global/access-roles/page.mdx @@ -40,8 +40,7 @@ For more information on user roles & permissions, see below: | Update Member Access | ✅ | ✅ | ❌ | ❌ | ❌ | | Update Billing | ✅ | ✅ | ❌ | ❌ | ❌ | | **Product** | | | | | | -| Create Product | ✅ | ✅ | ✅ | ✅ | ❌ | -| Update Product Name | ✅ | ✅ | ✅ | ❌ | ❌ | +| Create Product | ✅ | ✅ | ❌ | ❌ | ❌ | | Update Product Name | ✅ | ✅ | ✅ | ❌ | ❌ | | Update Product Recontact Options | ✅ | ✅ | ✅ | ✅ | ❌ | | Update Look & Feel | ✅ | ✅ | ✅ | ✅ | ❌ | @@ -85,7 +84,7 @@ There are two ways to invite organization members: One by one or in bulk. src={MenuItem} alt="Where to find the Menu Item for Organization Settings" quality="100" - className="max-w-full rounded-lg sm:max-w-3xl " + className="max-w-full rounded-lg sm:max-w-3xl" /> 2. Click on the `Add Member` button: @@ -94,7 +93,7 @@ There are two ways to invite organization members: One by one or in bulk. src={AddMember} alt="Add Member Button Position" quality="100" - className="max-w-full rounded-lg sm:max-w-3xl " + className="max-w-full rounded-lg sm:max-w-3xl" /> 3. In the modal, add the Name, Email and Role of the organization member you want to invite: @@ -103,7 +102,7 @@ There are two ways to invite organization members: One by one or in bulk. src={IndvInvite} alt="Individual Invite Modal Tab" quality="100" - className="max-w-full rounded-lg sm:max-w-3xl " + className="max-w-full rounded-lg sm:max-w-3xl" /> @@ -121,7 +120,7 @@ Formbricks sends an email to the organization member with an invitation link. Th src={MenuItem} alt="Where to find the Menu Item for Organization Settings" quality="100" - className="max-w-full rounded-lg sm:max-w-3xl " + className="max-w-full rounded-lg sm:max-w-3xl" /> 2. Click on the `Add Member` button: @@ -130,7 +129,7 @@ Formbricks sends an email to the organization member with an invitation link. Th src={AddMember} alt="Add Member Button Position" quality="100" - className="max-w-full rounded-lg sm:max-w-3xl " + className="max-w-full rounded-lg sm:max-w-3xl" /> 3. In the modal, switch to `Bulk Invite`. You can download an example .CSV file to fill in the Name, Email and Role of the organization members you want to invite: @@ -139,7 +138,7 @@ Formbricks sends an email to the organization member with an invitation link. Th src={BulkInvite} alt="Individual Invite Modal Tab" quality="100" - className="max-w-full rounded-lg sm:max-w-3xl " + className="max-w-full rounded-lg sm:max-w-3xl" /> 4. Upload the filled .CSV file and invite the organization members in bulk ✅ diff --git a/apps/web/app/(app)/environments/[environmentId]/components/MainNavigation.tsx b/apps/web/app/(app)/environments/[environmentId]/components/MainNavigation.tsx index ae1aeb61ac..0df36c814a 100644 --- a/apps/web/app/(app)/environments/[environmentId]/components/MainNavigation.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/components/MainNavigation.tsx @@ -82,6 +82,7 @@ export const MainNavigation = ({ const product = products.find((product) => product.id === environment.productId); const { isAdmin, isOwner, isViewer } = getAccessFlags(membershipRole); + const isOwnerOrAdmin = isAdmin || isOwner; const isPricingDisabled = !isOwner && !isAdmin; const toggleSidebar = () => { @@ -329,7 +330,7 @@ export const MainNavigation = ({ ))} - {!isViewer && ( + {isOwnerOrAdmin && ( handleAddProduct(organization.id)} className="rounded-lg"> Add product diff --git a/packages/lib/actionClient/permissions.ts b/packages/lib/actionClient/permissions.ts index fee0f6757f..74500174be 100644 --- a/packages/lib/actionClient/permissions.ts +++ b/packages/lib/actionClient/permissions.ts @@ -45,7 +45,7 @@ export const Permissions = { editor: { product: { - create: true, + create: false, read: true, update: true, delete: true, @@ -66,7 +66,7 @@ export const Permissions = { developer: { product: { - create: true, + create: false, read: true, update: ZProductUpdateInput.omit({ name: true,