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/importSessions.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'packages/trpc/models/importSessions.ts') diff --git a/packages/trpc/models/importSessions.ts b/packages/trpc/models/importSessions.ts index 270c2bce..56bcaf9a 100644 --- a/packages/trpc/models/importSessions.ts +++ b/packages/trpc/models/importSessions.ts @@ -15,9 +15,8 @@ import { } from "@karakeep/shared/types/importSessions"; import type { AuthedContext } from "../index"; -import { PrivacyAware } from "./privacy"; -export class ImportSession implements PrivacyAware { +export class ImportSession { protected constructor( protected ctx: AuthedContext, public session: ZImportSession, @@ -82,15 +81,6 @@ export class ImportSession implements PrivacyAware { ); } - ensureCanAccess(ctx: AuthedContext): void { - if (this.session.userId !== ctx.user.id) { - throw new TRPCError({ - code: "FORBIDDEN", - message: "User is not allowed to access this import session", - }); - } - } - async attachBookmark(bookmarkId: string): Promise { await this.ctx.db.insert(importSessionBookmarks).values({ importSessionId: this.session.id, -- cgit v1.2.3-70-g09d2