From e4db9bf2725f1714f273332f0a444ec940aae1a8 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sun, 23 Nov 2025 11:21:22 +0000 Subject: fix: Hide shared lists where user is a viewer in Manage Lists dialog (#2164) Users with viewer role cannot add/remove bookmarks from lists, so these lists should not appear in the Manage Lists dialog across all platforms (web, mobile, and extension). Changes: - Web: Updated BookmarkListSelector to filter out viewer lists - Mobile: Updated manage_lists.tsx to filter out viewer lists - Extension: Updated ListsSelector to filter out viewer lists Co-authored-by: Claude --- apps/web/components/dashboard/lists/BookmarkListSelector.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'apps/web') diff --git a/apps/web/components/dashboard/lists/BookmarkListSelector.tsx b/apps/web/components/dashboard/lists/BookmarkListSelector.tsx index a267c692..7f916949 100644 --- a/apps/web/components/dashboard/lists/BookmarkListSelector.tsx +++ b/apps/web/components/dashboard/lists/BookmarkListSelector.tsx @@ -46,10 +46,15 @@ export function BookmarkListSelector({ } allPaths = allPaths?.filter((path) => { - if (hideBookmarkIds.includes(path[path.length - 1].id)) { + const lastItem = path[path.length - 1]; + if (hideBookmarkIds.includes(lastItem.id)) { return false; } - if (!listTypes.includes(path[path.length - 1].type)) { + if (!listTypes.includes(lastItem.type)) { + return false; + } + // Hide lists where user is a viewer (can't add/remove bookmarks) + if (lastItem.userRole === "viewer") { return false; } if (!hideSubtreeOf) { -- cgit v1.2.3-70-g09d2