Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
fix: disable members to delete documents
Marc Seitzbd2f16969634
diff --git a/pages/api/teams/[teamId]/documents/[id]/index.ts b/pages/api/teams/[teamId]/documents/[id]/index.tsindex c3964d6f..f3107da2 100644--- a/pages/api/teams/[teamId]/documents/[id]/index.ts+++ b/pages/api/teams/[teamId]/documents/[id]/index.ts@@ -119,7 +119,7 @@ export default async function handle(team: {users: {some: {- // role: "ADMIN", // TODO: add role check when deleting document+ role: { in: ["ADMIN", "MANAGER"] },userId: userId,},},