Skip to content

Commit 3e63cd6

Browse files
authored
Merge pull request #2191 from dubinc/upgrade-saml-jackson
Upgrade `@boxyhq/saml-jackson` version
2 parents e5c6cac + fdc9aa7 commit 3e63cd6

File tree

4 files changed

+2034
-1328
lines changed

4 files changed

+2034
-1328
lines changed

apps/web/lib/actions/partners/ban-partner.ts

+9-32
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ import { prisma } from "@dub/prisma";
1212
import { waitUntil } from "@vercel/functions";
1313
import { authActionClient } from "../safe-action";
1414

15-
// TODO:
16-
// Save the ban reason
1715

1816
// Ban a partner
1917
export const banPartnerAction = authActionClient
@@ -79,36 +77,15 @@ export const banPartnerAction = authActionClient
7977
waitUntil(
8078
(async () => {
8179
// Send email to partner
82-
const [partner, workspaceUsers] = await Promise.all([
83-
prisma.partner.findUniqueOrThrow({
84-
where: {
85-
id: partnerId,
86-
},
87-
select: {
88-
email: true,
89-
name: true,
90-
},
91-
}),
92-
93-
prisma.projectUsers.findMany({
94-
where: {
95-
projectId: workspace.id,
96-
role: "owner",
97-
user: {
98-
email: {
99-
not: null,
100-
},
101-
},
102-
},
103-
include: {
104-
user: {
105-
select: {
106-
email: true,
107-
},
108-
},
109-
},
110-
}),
111-
]);
80+
const partner = await prisma.partner.findUniqueOrThrow({
81+
where: {
82+
id: partnerId,
83+
},
84+
select: {
85+
email: true,
86+
name: true,
87+
},
88+
});
11289

11390
if (!partner.email) {
11491
console.error("Partner has no email address.");

apps/web/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"dependencies": {
1919
"@ai-sdk/anthropic": "^1.0.7",
20-
"@boxyhq/saml-jackson": "1.23.9",
20+
"@boxyhq/saml-jackson": "1.43.0",
2121
"@chronark/zod-bird": "^0.3.9",
2222
"@dub/analytics": "^0.0.25",
2323
"@dub/email": "workspace:*",

apps/web/ui/auth/login/sso-sign-in.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export const SSOSignIn = () => {
1313
const {
1414
setClickedMethod,
1515
clickedMethod,
16+
authMethod,
1617
setLastUsedAuthMethod,
1718
setShowSSOOption,
1819
showSSOOption,
@@ -44,7 +45,9 @@ export const SSOSignIn = () => {
4445
>
4546
{showSSOOption && (
4647
<div>
47-
<div className="mb-4 mt-1 border-t border-neutral-300" />
48+
{authMethod !== "saml" && (
49+
<div className="mb-4 mt-1 border-t border-neutral-300" />
50+
)}
4851
<div className="flex items-center space-x-2">
4952
<h2 className="text-sm font-medium text-neutral-900">
5053
Workspace Slug

0 commit comments

Comments
 (0)