Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
feat: allow managers and admins to delete datarooms
Marc Seitz21a5fae38f65
diff --git a/pages/api/teams/[teamId]/datarooms/[id]/index.ts b/pages/api/teams/[teamId]/datarooms/[id]/index.tsindex 0d69996e..7dab5f9f 100644--- a/pages/api/teams/[teamId]/datarooms/[id]/index.ts+++ b/pages/api/teams/[teamId]/datarooms/[id]/index.ts@@ -130,7 +130,7 @@ export default async function handle(// check if current user is admin of the teamconst isUserAdmin = team.users.some((user) =>- user.role === "ADMIN" &&+ (user.role === "ADMIN" || user.role === "MANAGER") &&user.userId === (session.user as CustomUser).id,);if (!isUserAdmin) {