Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Gate hide/unhide shared album option behind internal user flag

Anand Baburajan2db6c6c41c84
diff --git a/web/apps/photos/src/components/Collections/CollectionHeader.tsx b/web/apps/photos/src/components/Collections/CollectionHeader.tsx
index 967bd98a6f..d9f2956955 100644
--- a/web/apps/photos/src/components/Collections/CollectionHeader.tsx
+++ b/web/apps/photos/src/components/Collections/CollectionHeader.tsx
@@ -161,7 +161,7 @@ const CollectionHeaderOptions: React.FC<CollectionHeaderProps> = ({
const { showMiniDialog, onGenericError } = useBaseContext();
const { showLoadingBar, hideLoadingBar, showNotification } =
usePhotosAppContext();
- const { mapEnabled } = useSettingsSnapshot();
+ const { mapEnabled, isInternalUser } = useSettingsSnapshot();
const overflowMenuIconRef = useRef<SVGSVGElement | null>(null);
const { show: showSortOrderMenu, props: sortOrderMenuVisibilityProps } =
@@ -541,25 +541,26 @@ const CollectionHeaderOptions: React.FC<CollectionHeaderProps> = ({
{t("archive_album")}
</OverflowMenuOption>
),
- activeCollection ? (
- isHiddenCollection(activeCollection) ? (
- <OverflowMenuOption
- key="unhide"
- onClick={unhideAlbum}
- startIcon={<VisibilityOutlinedIcon />}
- >
- {t("unhide_collection")}
- </OverflowMenuOption>
- ) : (
- <OverflowMenuOption
- key="hide"
- onClick={hideAlbum}
- startIcon={<VisibilityOffOutlinedIcon />}
- >
- {t("hide_collection")}
- </OverflowMenuOption>
- )
- ) : undefined,
+ isInternalUser &&
+ (activeCollection ? (
+ isHiddenCollection(activeCollection) ? (
+ <OverflowMenuOption
+ key="unhide"
+ onClick={unhideAlbum}
+ startIcon={<VisibilityOutlinedIcon />}
+ >
+ {t("unhide_collection")}
+ </OverflowMenuOption>
+ ) : (
+ <OverflowMenuOption
+ key="hide"
+ onClick={hideAlbum}
+ startIcon={<VisibilityOffOutlinedIcon />}
+ >
+ {t("hide_collection")}
+ </OverflowMenuOption>
+ )
+ ) : undefined),
<OverflowMenuOption
key="leave"
startIcon={<LogoutIcon />}