aboutsummaryrefslogtreecommitdiffstats
path: root/packages/trpc/models/lists.ts
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-11-17 01:42:43 +0000
committerMohamed Bassem <me@mbassem.com>2025-11-17 01:42:43 +0000
commit815e1961701e13c933c3975c6026c60d1ded3cdf (patch)
treeb88921d5cc37720fb3a3c1654417fce3fa0f6f02 /packages/trpc/models/lists.ts
parent88c73e212c4510ce41ad8c6557fa7d5c8f72d199 (diff)
downloadkarakeep-815e1961701e13c933c3975c6026c60d1ded3cdf.tar.zst
refactor: remove the PrivacyAware interface
Diffstat (limited to 'packages/trpc/models/lists.ts')
-rw-r--r--packages/trpc/models/lists.ts12
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.
*/