Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

fix: import and remove checking doc owner

Marc Seitz6b56f6ec4e92
diff --git a/lib/emails/send-teammate-invite.ts b/lib/emails/send-teammate-invite.ts
index b827aa24..7ee4676c 100644
--- a/lib/emails/send-teammate-invite.ts
+++ b/lib/emails/send-teammate-invite.ts
@@ -1,4 +1,4 @@
-import TeamInvitation from "@/components/emails/ tation";
+import TeamInvitation from "@/components/emails/team-invitation";
import { sendEmail } from "@/lib/resend";
export const sendTeammateInviteEmail = async ({
diff --git a/lib/team/helper.ts b/lib/team/helper.ts
index ad848bc9..fee5cc33 100644
--- a/lib/team/helper.ts
+++ b/lib/team/helper.ts
@@ -69,12 +69,12 @@ export async function getTeamWithUsersAndDocument({
}
// Check that the user is owner of the document, otherwise return 401
- if (checkOwner) {
- const isUserOwnerOfDocument = document?.ownerId === userId;
- if (!isUserOwnerOfDocument) {
- throw new TeamError("Unauthorized access to the document");
- }
- }
+ // if (checkOwner) {
+ // const isUserOwnerOfDocument = document?.ownerId === userId;
+ // if (!isUserOwnerOfDocument) {
+ // throw new TeamError("Unauthorized access to the document");
+ // }
+ // }
return { team, document };
}