Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Pull master and resolve conflicts

Joshen Lim473b15ae2c5e
diff --cc studio/pages/new/[slug].tsx
index 54ea70405be,359aad2bc6a..44c83085c71
--- a/studio/pages/new/[slug].tsx
+++ b/studio/pages/new/[slug].tsx
@@@ -5,10 -9,9 +5,10 @@@ import { toJS } from 'mobx
import { observer } from 'mobx-react-lite'
import generator from 'generate-password'
import { Button, Listbox, IconUsers, Input, IconLoader, Alert } from '@supabase/ui'
+import { PermissionAction } from '@supabase/shared-types/out/constants'
import { NextPageWithLayout } from 'types'
- import { passwordStrength } from 'lib/helpers'
+ import { passwordStrength, pluckObjectFields } from 'lib/helpers'
import { get, post } from 'lib/common/fetch'
import {
API_URL,
@@@ -57,14 -59,11 +57,15 @@@ const Wizard: NextPageWithLayout = () =
const currentOrg = organizations.find((o: any) => o.slug === slug)
const stripeCustomerId = currentOrg?.stripe_customer_id
+ const isOrganizationOwner = ui.selectedOrganization?.is_owner
const totalFreeProjects = subscriptionStats.total_active_free_projects
const freeProjectsLimit = ui.profile?.free_project_limit ?? DEFAULT_FREE_PROJECTS_LIMIT
+ const availableRegions = getAvailableRegions()
- const isOrganizationOwner = currentOrg?.is_owner || !app.organizations.isInitialized
+ const isAdmin = enablePermissions
+ ? checkPermissions(PermissionAction.SQL_INSERT, 'postgres.public.projects')
+ : isOrganizationOwner
+
const isEmptyOrganizations = organizations.length <= 0 && app.organizations.isInitialized
const isEmptyPaymentMethod = paymentMethods ? !paymentMethods.length : false
const isOverFreeProjectLimit = totalFreeProjects >= freeProjectsLimit