Skip to content

Commit e448b95

Browse files
committed
Disable pendingUpgrade flow for organizations for now - it is proving too cumbersome to the org onboarding flow for the value it gives us. Now, users can directly create accounts as either 'user' or 'organization' user roles
1 parent d6fb1d5 commit e448b95

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

functions/src/profile/finishSignup.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,17 @@ export const finishSignup = functions.https.onCall(async (data, context) => {
1414

1515
const { requestedRole } = checkRequestZod(CreateProfileRequest, data)
1616

17-
let role: Role = "user"
17+
let role: Role = requestedRole
1818

1919
// Only an admin can approve organizations, after they've signed up initially
2020
// There's a nextjs api route: PATCH /users/<uid> {"role": <role>}
21-
if (requestedRole === "organization") {
22-
role = "pendingUpgrade"
23-
}
21+
22+
// Removing the "pendingUpgrade" flow (temporarily) because the
23+
// organization approval process is currently too cumbersome.
24+
25+
// if (requestedRole === "organization") {
26+
// role = "pendingUpgrade"
27+
// }
2428

2529
await setRole({ role, auth, db, uid })
2630

0 commit comments

Comments
 (0)