diff options
| author | Mohamed Bassem <me@mbassem.com> | 2025-11-17 01:42:43 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2025-11-17 01:42:43 +0000 |
| commit | 815e1961701e13c933c3975c6026c60d1ded3cdf (patch) | |
| tree | b88921d5cc37720fb3a3c1654417fce3fa0f6f02 /packages/trpc/models/lists.ts | |
| parent | 88c73e212c4510ce41ad8c6557fa7d5c8f72d199 (diff) | |
| download | karakeep-815e1961701e13c933c3975c6026c60d1ded3cdf.tar.zst | |
refactor: remove the PrivacyAware interface
Diffstat (limited to 'packages/trpc/models/lists.ts')
| -rw-r--r-- | packages/trpc/models/lists.ts | 12 |
1 files changed, 1 insertions, 11 deletions
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. */ |
