aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-11-23 11:21:22 +0000
committerGitHub <noreply@github.com>2025-11-23 11:21:22 +0000
commite4db9bf2725f1714f273332f0a444ec940aae1a8 (patch)
treec3960be69916673c06f78bf9d14fa5866316eea1 /apps/web
parent45081dcb472f6aa197d6ebdc129485f77fe3ee88 (diff)
downloadkarakeep-e4db9bf2725f1714f273332f0a444ec940aae1a8.tar.zst
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 <noreply@anthropic.com>
Diffstat (limited to 'apps/web')
-rw-r--r--apps/web/components/dashboard/lists/BookmarkListSelector.tsx9
1 files changed, 7 insertions, 2 deletions
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) {