Skip to content

The Open Source DocuSign Alternative.

fix: add hipaa flag (#2603)

David Nguyene67e19358a0f
diff --git a/apps/remix/app/components/dialogs/claim-create-dialog.tsx b/apps/remix/app/components/dialogs/claim-create-dialog.tsx
index 589484693..b308fa485 100644
--- a/apps/remix/app/components/dialogs/claim-create-dialog.tsx
+++ b/apps/remix/app/components/dialogs/claim-create-dialog.tsx
@@ -57,7 +57,7 @@ export const ClaimCreateDialog = ({ licenseFlags }: ClaimCreateDialogProps) => {
</Button>
</DialogTrigger>
- <DialogContent className="sm:max-w-md">
+ <DialogContent className="scrollbar-hidden max-h-[90vh] overflow-y-auto sm:max-w-md">
<DialogHeader>
<DialogTitle>
<Trans>Create Subscription Claim</Trans>
diff --git a/apps/remix/app/components/dialogs/claim-update-dialog.tsx b/apps/remix/app/components/dialogs/claim-update-dialog.tsx
index 6f0051ab4..01057910b 100644
--- a/apps/remix/app/components/dialogs/claim-update-dialog.tsx
+++ b/apps/remix/app/components/dialogs/claim-update-dialog.tsx
@@ -53,7 +53,7 @@ export const ClaimUpdateDialog = ({ claim, trigger, licenseFlags }: ClaimUpdateD
{trigger}
</DialogTrigger>
- <DialogContent className="sm:max-w-md">
+ <DialogContent className="scrollbar-hidden max-h-[90vh] overflow-y-auto sm:max-w-md">
<DialogHeader>
<DialogTitle>
<Trans>Update Subscription Claim</Trans>
diff --git a/apps/remix/app/components/general/admin-license-card.tsx b/apps/remix/app/components/general/admin-license-card.tsx
index 1eb2167e4..c88e42aca 100644
--- a/apps/remix/app/components/general/admin-license-card.tsx
+++ b/apps/remix/app/components/general/admin-license-card.tsx
@@ -1,7 +1,11 @@
+import { useState } from 'react';
+
import { Trans, useLingui } from '@lingui/react/macro';
import {
ArrowRightIcon,
CheckCircle2Icon,
+ EyeIcon,
+ EyeOffIcon,
KeyRoundIcon,
Loader2Icon,
RefreshCwIcon,
@@ -32,6 +36,7 @@ type AdminLicenseCardProps = {
export const AdminLicenseCard = ({ licenseData }: AdminLicenseCardProps) => {
const { t, i18n } = useLingui();
+ const [isLicenseKeyVisible, setIsLicenseKeyVisible] = useState(false);
const { license } = licenseData || {};
@@ -53,6 +58,7 @@ export const AdminLicenseCard = ({ licenseData }: AdminLicenseCardProps) => {
<p className="text-sm font-medium text-destructive">
<Trans>Invalid License Key</Trans>
</p>
+ {/* Don't need to hide invalid license keys. */}
<p className="text-xs text-muted-foreground">{licenseData.requestedLicenseKey}</p>
</>
) : (
@@ -135,7 +141,26 @@ export const AdminLicenseCard = ({ licenseData }: AdminLicenseCardProps) => {
<p className="text-sm font-medium text-foreground">
<Trans>License Key</Trans>
</p>
- <p className="mt-0.5 text-xs text-muted-foreground">{license.licenseKey}</p>
+ <div className="mt-0.5 flex items-center gap-1">
+ <p className="min-w-0 break-all text-xs text-muted-foreground">
+ {isLicenseKeyVisible ? license.licenseKey : '•'.repeat(license.licenseKey.length)}
+ </p>
+
+ <Button
+ type="button"
+ variant="ghost"
+ size="sm"
+ className="h-6 w-6 p-0 text-muted-foreground"
+ aria-label={isLicenseKeyVisible ? t`Hide license key` : t`Show license key`}
+ onClick={() => setIsLicenseKeyVisible((prevState) => !prevState)}
+ >
+ {isLicenseKeyVisible ? (
+ <EyeOffIcon className="h-3.5 w-3.5" />
+ ) : (
+ <EyeIcon className="h-3.5 w-3.5" />
+ )}
+ </Button>
+ </div>
</div>
<div>
diff --git a/packages/lib/jobs/definitions/internal/backport-subscription-claims.ts b/packages/lib/jobs/definitions/internal/backport-subscription-claims.ts
index 9698d0c8b..dcb83456e 100644
--- a/packages/lib/jobs/definitions/internal/backport-subscription-claims.ts
+++ b/packages/lib/jobs/definitions/internal/backport-subscription-claims.ts
@@ -18,6 +18,7 @@ const BACKPORT_SUBSCRIPTION_CLAIM_JOB_DEFINITION_SCHEMA = z.object({
embedSigning: z.literal(true).optional(),
embedSigningWhiteLabel: z.literal(true).optional(),
cfr21: z.literal(true).optional(),
+ hipaa: z.literal(true).optional(),
// Todo: Envelopes - Do we need to check?
// authenticationPortal & emailDomains missing here.
}),
diff --git a/packages/lib/types/license.ts b/packages/lib/types/license.ts
index b0194fff3..15c361fb8 100644
--- a/packages/lib/types/license.ts
+++ b/packages/lib/types/license.ts
@@ -8,6 +8,7 @@ export const ZLicenseClaimSchema = z.object({
embedAuthoring: z.boolean().optional(),
embedAuthoringWhiteLabel: z.boolean().optional(),
cfr21: z.boolean().optional(),
+ hipaa: z.boolean().optional(),
authenticationPortal: z.boolean().optional(),
billing: z.boolean().optional(),
});
diff --git a/packages/lib/types/subscription.ts b/packages/lib/types/subscription.ts
index 580994428..724a6c747 100644
--- a/packages/lib/types/subscription.ts
+++ b/packages/lib/types/subscription.ts
@@ -29,6 +29,8 @@ export const ZClaimFlagsSchema = z.object({
cfr21: z.boolean().optional(),
+ hipaa: z.boolean().optional(),
+
authenticationPortal: z.boolean().optional(),
allowLegacyEnvelopes: z.boolean().optional(),
@@ -85,6 +87,11 @@ export const SUBSCRIPTION_CLAIM_FEATURE_FLAGS: Record<
label: '21 CFR',
isEnterprise: true,
},
+ hipaa: {
+ key: 'hipaa',
+ label: 'HIPAA',
+ isEnterprise: true,
+ },
authenticationPortal: {
key: 'authenticationPortal',
label: 'Authentication portal',