diff --git a/web/src/components/features/ShareMenu/ShareMenuContent.tsx b/web/src/components/features/ShareMenu/ShareMenuContent.tsx
index 8d0e6d6b6..8902533e7 100644
--- a/web/src/components/features/ShareMenu/ShareMenuContent.tsx
+++ b/web/src/components/features/ShareMenu/ShareMenuContent.tsx
@@ -1,5 +1,5 @@
import { type BusterShare, ShareAssetType, ShareRole } from '@/api/asset_interfaces';
-import React, { useMemo, useState } from 'react';
+import React, { useState } from 'react';
import { ShareMenuTopBar, ShareMenuTopBarOptions } from './ShareMenuTopBar';
import { ShareMenuContentBody } from './ShareMenuContentBody';
import { useMemoizedFn } from '@/hooks';
diff --git a/web/src/components/features/ShareMenu/ShareMenuContentBody.tsx b/web/src/components/features/ShareMenu/ShareMenuContentBody.tsx
index c8c7dcff9..9b7b358de 100644
--- a/web/src/components/features/ShareMenu/ShareMenuContentBody.tsx
+++ b/web/src/components/features/ShareMenu/ShareMenuContentBody.tsx
@@ -203,14 +203,14 @@ const ShareMenuContentShare: React.FC<{
)}
- {hasUserTeams && (
+ {/* {hasUserTeams && (
<>
-
+ {hasIndividualPermissions && }
>
- )}
+ )} */}
);
}
@@ -223,7 +223,7 @@ const ShareWithGroupAndTeamOption: React.FC<{
return (
+ className={cn('hover:bg-item-hover flex cursor-pointer items-center space-x-1.5')}>
} />
Share with groups & teams
diff --git a/web/src/layouts/ChatLayout/FileContainer/FileContainerHeader/MetricContainerHeaderButtons/MetricContainerHeaderButtons.tsx b/web/src/layouts/ChatLayout/FileContainer/FileContainerHeader/MetricContainerHeaderButtons/MetricContainerHeaderButtons.tsx
index cb6792a17..3ee91c09c 100644
--- a/web/src/layouts/ChatLayout/FileContainer/FileContainerHeader/MetricContainerHeaderButtons/MetricContainerHeaderButtons.tsx
+++ b/web/src/layouts/ChatLayout/FileContainer/FileContainerHeader/MetricContainerHeaderButtons/MetricContainerHeaderButtons.tsx
@@ -30,6 +30,7 @@ export const MetricContainerHeaderButtons: React.FC =
+
@@ -78,7 +79,7 @@ const EditSQLButton = React.memo(() => {
return (
}
onClick={onClickButton}
selected={isSelectedView}
diff --git a/web/src/layouts/ChatLayout/FileContainer/FileContainerHeader/MetricContainerHeaderButtons/MetricThreeDotMenu.tsx b/web/src/layouts/ChatLayout/FileContainer/FileContainerHeader/MetricContainerHeaderButtons/MetricThreeDotMenu.tsx
index 878b8e091..3fde1d268 100644
--- a/web/src/layouts/ChatLayout/FileContainer/FileContainerHeader/MetricContainerHeaderButtons/MetricThreeDotMenu.tsx
+++ b/web/src/layouts/ChatLayout/FileContainer/FileContainerHeader/MetricContainerHeaderButtons/MetricThreeDotMenu.tsx
@@ -36,7 +36,7 @@ import { ASSET_ICONS } from '@/components/features/config/assetIcons';
import { useSaveToDashboardDropdownContent } from '@/components/features/dropdowns/SaveToDashboardDropdown';
import { useMemoizedFn } from '@/hooks';
import { useSaveToCollectionsDropdownContent } from '@/components/features/dropdowns/SaveToCollectionsDropdown';
-import { ShareAssetType, VerificationStatus } from '@/api/asset_interfaces/share';
+import { ShareAssetType, ShareRole, VerificationStatus } from '@/api/asset_interfaces/share';
import { useStatusDropdownContent } from '@/components/features/metrics/StatusBadgeIndicator/StatusDropdownContent';
import { StatusBadgeIndicator } from '@/components/features/metrics/StatusBadgeIndicator';
import { useFavoriteStar } from '@/components/features/list/FavoriteStar';
@@ -432,20 +432,24 @@ const useRenameMetricSelectMenu = ({ metricId }: { metricId: string }) => {
export const useShareMenuSelectMenu = ({ metricId }: { metricId: string }) => {
const { data: metric } = useGetMetric(metricId);
+ const isOwner = metric?.permission === ShareRole.OWNER;
return useMemo(
() => ({
label: 'Share metric',
value: 'share-metric',
icon: ,
- items: [
-
- ]
+ disabled: !isOwner,
+ items: isOwner
+ ? [
+
+ ]
+ : undefined
}),
[metricId]
);