We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 86ff5dd commit de647ddCopy full SHA for de647dd
1 file changed
apps/sim/lib/workspaces/policy.ts
@@ -183,11 +183,13 @@ export async function getWorkspaceCreationPolicy({
183
)[0]?.role
184
185
if (activeOrganizationId && !orgRole) {
186
+ const billedAccountUserId = await requireOrganizationOwnerId(activeOrganizationId)
187
+
188
return {
189
canCreate: false,
190
workspaceMode: WORKSPACE_MODE.ORGANIZATION,
191
organizationId: activeOrganizationId,
- billedAccountUserId: (await getOrganizationOwnerId(activeOrganizationId)) ?? userId,
192
+ billedAccountUserId,
193
maxWorkspaces: null,
194
currentWorkspaceCount: 0,
195
reason: 'Only organization owners and admins can create organization workspaces.',
0 commit comments