From 815e1961701e13c933c3975c6026c60d1ded3cdf Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Mon, 17 Nov 2025 01:42:43 +0000 Subject: refactor: remove the PrivacyAware interface --- packages/trpc/models/lists.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'packages/trpc/models/lists.ts') diff --git a/packages/trpc/models/lists.ts b/packages/trpc/models/lists.ts index 28473c12..2250819f 100644 --- a/packages/trpc/models/lists.ts +++ b/packages/trpc/models/lists.ts @@ -26,13 +26,12 @@ import { AuthedContext, Context } from ".."; import { buildImpersonatingAuthedContext } from "../lib/impersonate"; import { getBookmarkIdsFromMatcher } from "../lib/search"; import { Bookmark } from "./bookmarks"; -import { PrivacyAware } from "./privacy"; interface ListCollaboratorEntry { membershipId: string; } -export abstract class List implements PrivacyAware { +export abstract class List { protected constructor( protected ctx: AuthedContext, protected list: ZBookmarkList & { userId: string }, @@ -388,15 +387,6 @@ export abstract class List implements PrivacyAware { }); } - ensureCanAccess(ctx: AuthedContext): void { - if (this.list.userId != ctx.user.id) { - throw new TRPCError({ - code: "FORBIDDEN", - message: "User is not allowed to access resource", - }); - } - } - /** * Check if the user can view this list and its bookmarks. */ -- cgit v1.2.3-70-g09d2