Skip to content

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

feat(ee): add watermark on business

Marc Seitz0d2eb64c6314
diff --git a/components/links/link-sheet/link-options.tsx b/components/links/link-sheet/link-options.tsx
index ea0f6a67..d377898e 100644
--- a/components/links/link-sheet/link-options.tsx
+++ b/components/links/link-sheet/link-options.tsx
@@ -52,6 +52,7 @@ export const LinkOptions = ({
const allowAdvancedLinkControls = limits
? limits?.advancedLinkControlsOnPro
: false;
+ const allowWatermarkOnBusiness = limits?.watermarkOnBusiness ?? false;
const [openUpgradeModal, setOpenUpgradeModal] = useState<boolean>(false);
const [trigger, setTrigger] = useState<string>("");
@@ -136,7 +137,7 @@ export const LinkOptions = ({
/>
<WatermarkSection
{...{ data, setData }}
- isAllowed={isTrial || isDatarooms}
+ isAllowed={isTrial || isDatarooms || allowWatermarkOnBusiness}
handleUpgradeStateChange={handleUpgradeStateChange}
/>
<AgreementSection
diff --git a/ee/limits/constants.ts b/ee/limits/constants.ts
index b5632e89..2bd2344b 100644
--- a/ee/limits/constants.ts
+++ b/ee/limits/constants.ts
@@ -9,6 +9,7 @@ export type TPlanLimits = {
customDomainOnPro: boolean;
customDomainInDataroom: boolean;
advancedLinkControlsOnPro: boolean | null;
+ watermarkOnBusiness?: boolean | null;
};
export const FREE_PLAN_LIMITS = {
diff --git a/ee/limits/server.ts b/ee/limits/server.ts
index 1c70bbff..3c5f04ab 100644
--- a/ee/limits/server.ts
+++ b/ee/limits/server.ts
@@ -38,6 +38,7 @@ const configSchema = z.object({
customDomainOnPro: z.boolean(),
customDomainInDataroom: z.boolean(),
advancedLinkControlsOnPro: z.boolean().nullish(),
+ watermarkOnBusiness: z.boolean().nullish(),
});
export async function getLimits({
diff --git a/ee/limits/swr-handler.ts b/ee/limits/swr-handler.ts
index a9f1fbfb..8deae17d 100644
--- a/ee/limits/swr-handler.ts
+++ b/ee/limits/swr-handler.ts
@@ -12,6 +12,7 @@ export type LimitProps = {
customDomainOnPro: boolean;
customDomainInDataroom: boolean;
advancedLinkControlsOnPro: boolean | undefined | null;
+ watermarkOnBusiness: boolean | undefined | null;
usage: {
documents: number;
links: number;