Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/apps/www/public/images/blog @supabase/marketing
/apps/www/lib/redirects.js

/docker/ @supabase/dev-workflows
/docker/ @supabase/dev-workflows @aantti

/apps/studio/csp.js @supabase/security
/apps/studio/components/interfaces/Billing/Payment @supabase/security
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ This method requires two steps - first delete in Supabase, then clean up in Verc

Go to your [project settings](/dashboard/project/_/settings/general) and click **"Delete project"**. This permanently removes your database and marks it as "uninstalled" in Vercel.

<Image
alt="Delete project button in Supabase project settings"
src="/docs/img/troubleshooting/54428354-a1f4-4c44-bd03-d87f4b925d94.png"
zoomable
/>
![Delete project button in Supabase project settings](/docs/img/troubleshooting/54428354-a1f4-4c44-bd03-d87f4b925d94.png)

2. **Clean up in Vercel**

Expand All @@ -32,27 +28,15 @@ This method requires two steps - first delete in Supabase, then clean up in Verc
- Go to the **Storage** tab
- Click on the Supabase project (it will show as "uninstalled")

<Image
alt="Uninstalled Supabase project in Vercel Storage"
src="/docs/img/troubleshooting/cf450bca-aad3-4783-ae3b-5cc83e0afa54.png"
zoomable
/>
![Uninstalled Supabase project in Vercel Storage](/docs/img/troubleshooting/cf450bca-aad3-4783-ae3b-5cc83e0afa54.png)

- Scroll down and find the **Settings** tab in the sidebar

<Image
alt="Vercel project settings navigation"
src="/docs/img/troubleshooting/da70bc33-f123-4567-8901-abcdef123456.png"
zoomable
/>
![Vercel project settings navigation](/docs/img/troubleshooting/da70bc33-f123-4567-8901-abcdef123456.png)

- Click **Delete Database** to completely remove it

<Image
alt="Delete Database button in Vercel settings"
src="/docs/img/troubleshooting/c4e7b193-4567-8901-abcd-ef1234567890.png"
zoomable
/>{' '}
![Delete Database button in Vercel settings](/docs/img/troubleshooting/c4e7b193-4567-8901-abcd-ef1234567890.png)

### Method 2: Delete directly from Vercel (removes from both platforms)

Expand All @@ -70,21 +54,13 @@ This method deletes the project from both Vercel and Supabase in one action.

Find and click the **Settings** tab in the sidebar.

<Image
alt="Vercel project settings navigation"
src="/docs/img/troubleshooting/da70bc33-f123-4567-8901-abcdef123456.png"
zoomable
/>
![Vercel project settings navigation](/docs/img/troubleshooting/da70bc33-f123-4567-8901-abcdef123456.png)

4. **Delete the project**

Scroll down and click **Delete Database**. This removes the project from both Vercel and Supabase simultaneously.

<Image
alt="Delete Database button in Vercel settings"
src="/docs/img/troubleshooting/c4e7b193-4567-8901-abcd-ef1234567890.png"
zoomable
/>
![Delete Database button in Vercel settings](/docs/img/troubleshooting/c4e7b193-4567-8901-abcd-ef1234567890.png)

## Transferring projects from Vercel organizations

Expand All @@ -100,11 +76,7 @@ If you want to move a Vercel-linked project to a different organization:

Go to your [project settings](/dashboard/project/_/settings/general) and look for **"Transfer Project"**. Transfer your project to a different organization.

<Image
alt="Transfer project option in Supabase project settings"
src="/docs/img/troubleshooting/627c1a3e-153e-40b5-9a91-a4f7bd7673a4.png"
zoomable
/>
![Transfer project option in Supabase project settings](/docs/img/troubleshooting/627c1a3e-153e-40b5-9a91-a4f7bd7673a4.png)

Note: The owner must be a member of both the source and target organizations. Transferring a Vercel-managed project will remove its linked Vercel storage from your team.

Expand Down Expand Up @@ -133,21 +105,13 @@ Delete all associated projects before deleting the organization.

Go to your [organization settings](/dashboard/org/_/general) and click **"Delete organization in Vercel Marketplace"**. This opens the Vercel settings page.

<Image
alt="Delete organization in Vercel Marketplace button"
src="/docs/img/troubleshooting/ff01bba8-abcd-ef12-3456-7890abcdef12.png"
zoomable
/>
![Delete organization in Vercel Marketplace button](/docs/img/troubleshooting/ff01bba8-abcd-ef12-3456-7890abcdef12.png)

2. **Uninstall integration**

Scroll down and click **Uninstall Integration** to fully remove the organization and disconnect it from Vercel.

<Image
alt="Uninstall Integration button in Vercel settings"
src="/docs/img/troubleshooting/f294a4d6-ef12-3456-7890-abcdef123456.png"
zoomable
/>
![Uninstall Integration button in Vercel settings](/docs/img/troubleshooting/f294a4d6-ef12-3456-7890-abcdef123456.png)

## Important notes

Expand Down
3 changes: 3 additions & 0 deletions apps/docs/public/humans.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Aleksi Immonen
Alexander Korotkov
Amy Q
Andrew Valleteau
Andrey A
Angelico de los Reyes
Ant Wilson
Ariuna K
Expand Down Expand Up @@ -50,6 +51,7 @@ Dustin Keib
Eduardo Gurgel
Egor Romanov
Eleftheria Trivyzaki
Eliot Whalan
Emmett Folger
Eric Kharitonashvili
Etienne Stalmans
Expand All @@ -60,6 +62,7 @@ Francesco Sansalvadore
Greg Kress
Greg P
Greg Richardson
Gregor Vand
Guilherme Souza
Hannah Bowers
Hardik Maheshwari
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { THRESHOLD_COUNT } from '@supabase/pg-meta/src/sql/studio/get-count-estimate'
import { ArrowLeft, ArrowRight, HelpCircle } from 'lucide-react'
import { useEffect, useState } from 'react'

import { useParams } from 'common'
import { useTableFilter } from 'components/grid/hooks/useTableFilter'
import { useTableEditorQuery } from 'data/table-editor/table-editor-query'
import { isTable } from 'data/table-editor/table-editor-types'
import { THRESHOLD_COUNT, useTableRowsCountQuery } from 'data/table-rows/table-rows-count-query'
import { useTableRowsCountQuery } from 'data/table-rows/table-rows-count-query'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { RoleImpersonationState } from 'lib/role-impersonation'
import { useRoleImpersonationStateSnapshot } from 'state/role-impersonation-state'
Expand Down
112 changes: 112 additions & 0 deletions apps/studio/components/interfaces/Auth/Users/SortDropdown.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
import { ButtonTooltip } from 'components/ui/ButtonTooltip'
import { ArrowDownNarrowWide, ArrowDownWideNarrow } from 'lucide-react'

import {
Button,
DropdownMenu,
DropdownMenuContent,
DropdownMenuRadioGroup,
DropdownMenuRadioItem,
DropdownMenuSub,
DropdownMenuSubContent,
DropdownMenuSubTrigger,
DropdownMenuTrigger,
} from 'ui'

interface SortDropdownProps {
specificFilterColumn: string
sortColumn: string
sortOrder: string
sortByValue: string
showSortByEmail: boolean
showSortByPhone: boolean
setSortByValue: (value: string) => void
}

export const SortDropdown = ({
specificFilterColumn,
sortColumn,
sortOrder,
sortByValue,
showSortByEmail,
showSortByPhone,
setSortByValue,
}: SortDropdownProps) => {
if (specificFilterColumn !== 'freeform') {
return (
<ButtonTooltip
disabled
type="default"
icon={<ArrowDownNarrowWide />}
tooltip={{
content: {
side: 'bottom',
className: 'w-80 text-center',
text: (
<>
Sorting cannot be changed which searching on a specific column. If you'd like to
sort on other columns, change the search to{' '}
<span className="text-warning">all columns</span> from the header.
</>
),
},
}}
>
Sorted by user ID
</ButtonTooltip>
)
}

return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button icon={sortOrder === 'desc' ? <ArrowDownWideNarrow /> : <ArrowDownNarrowWide />}>
Sorted by {sortColumn === 'id' ? 'user ID' : sortColumn.replaceAll('_', ' ')}
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent className="w-44" align="start">
<DropdownMenuRadioGroup value={sortByValue} onValueChange={setSortByValue}>
<DropdownMenuSub>
<DropdownMenuSubTrigger>Sort by user ID</DropdownMenuSubTrigger>
<DropdownMenuSubContent>
<DropdownMenuRadioItem value="id:asc">Ascending</DropdownMenuRadioItem>
<DropdownMenuRadioItem value="id:desc">Descending</DropdownMenuRadioItem>
</DropdownMenuSubContent>
</DropdownMenuSub>
<DropdownMenuSub>
<DropdownMenuSubTrigger>Sort by created at</DropdownMenuSubTrigger>
<DropdownMenuSubContent>
<DropdownMenuRadioItem value="created_at:asc">Ascending</DropdownMenuRadioItem>
<DropdownMenuRadioItem value="created_at:desc">Descending</DropdownMenuRadioItem>
</DropdownMenuSubContent>
</DropdownMenuSub>
<DropdownMenuSub>
<DropdownMenuSubTrigger>Sort by last sign in at</DropdownMenuSubTrigger>
<DropdownMenuSubContent>
<DropdownMenuRadioItem value="last_sign_in_at:asc">Ascending</DropdownMenuRadioItem>
<DropdownMenuRadioItem value="last_sign_in_at:desc">Descending</DropdownMenuRadioItem>
</DropdownMenuSubContent>
</DropdownMenuSub>
{showSortByEmail && (
<DropdownMenuSub>
<DropdownMenuSubTrigger>Sort by email</DropdownMenuSubTrigger>
<DropdownMenuSubContent>
<DropdownMenuRadioItem value="email:asc">Ascending</DropdownMenuRadioItem>
<DropdownMenuRadioItem value="email:desc">Descending</DropdownMenuRadioItem>
</DropdownMenuSubContent>
</DropdownMenuSub>
)}
{showSortByPhone && (
<DropdownMenuSub>
<DropdownMenuSubTrigger>Sort by phone</DropdownMenuSubTrigger>
<DropdownMenuSubContent>
<DropdownMenuRadioItem value="phone:asc">Ascending</DropdownMenuRadioItem>
<DropdownMenuRadioItem value="phone:desc">Descending</DropdownMenuRadioItem>
</DropdownMenuSubContent>
</DropdownMenuSub>
)}
</DropdownMenuRadioGroup>
</DropdownMenuContent>
</DropdownMenu>
)
}
6 changes: 6 additions & 0 deletions apps/studio/components/interfaces/Auth/Users/UserLogs.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ExternalLink, RefreshCw } from 'lucide-react'
import Link from 'next/link'
import { useQueryState } from 'nuqs'
import { useEffect } from 'react'

import { useParams } from 'common'
Expand All @@ -21,6 +22,7 @@ interface UserLogsProps {
export const UserLogs = ({ user }: UserLogsProps) => {
const { ref } = useParams()
const { filters, setFilters } = useLogsUrlState()
const [_, setFiltersValue] = useQueryState('f')

const {
logData: authLogs,
Expand All @@ -36,6 +38,10 @@ export const UserLogs = ({ user }: UserLogsProps) => {

useEffect(() => {
if (user.id) setFilters({ ...filters, search_query: user.id })

return () => {
setFiltersValue(null)
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [user.id])

Expand Down
2 changes: 1 addition & 1 deletion apps/studio/components/interfaces/Auth/Users/UserPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const UserPanel = ({ selectedUser, onClose }: UserPanelProps) => {
Clear
</Button>
</div>
<SimpleCodeBlock className="javascript">
<SimpleCodeBlock className="javascript" parentClassName="[&>*>span]:text-xs">
{JSON.stringify(filteredProperties, null, 2)}
</SimpleCodeBlock>
</TabsContent_Shadcn_>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { BASE_PATH } from 'lib/constants'
import { PROVIDER_PHONE, PROVIDERS_SCHEMAS } from '../AuthProvidersFormValidation'

export type Filter = 'all' | 'verified' | 'unverified' | 'anonymous'

export const UUIDV4_LEFT_PREFIX_REGEX =
/^(?:[0-9a-f]{1,8}|[0-9a-f]{8}-|[0-9a-f]{8}-[0-9a-f]{1,4}|[0-9a-f]{8}-[0-9a-f]{4}-|[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{0,3}|[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-|[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{0,3}|[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-|[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{0,12})$/i

export const PHONE_NUMBER_LEFT_PREFIX_REGEX = /^[+]?[0-9]{0,15}$/

export const PANEL_PADDING = 'px-5 py-5'

// [Joshen] Temporary fix as bulk delete will fire n requests since Auth + API do not have a bulk delete endpoint yet
Expand Down
10 changes: 9 additions & 1 deletion apps/studio/components/interfaces/Auth/Users/Users.utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,15 @@ export function getAvatarUrl(user: User): string | undefined {
}

export const formatUserColumns = ({
specificFilterColumn,
columns,
config,
users,
visibleColumns = [],
setSortByValue,
onSelectDeleteUser,
}: {
specificFilterColumn: string
columns: UsersTableColumn[]
config: ColumnConfiguration[]
users: User[]
Expand All @@ -283,7 +285,13 @@ export const formatUserColumns = ({
// to support - the component is ready as such: Just pass selectedUsers and allRowsSelected as props from parent
// <SelectHeaderCell selectedUsers={selectedUsers} allRowsSelected={allRowsSelected} />
if (col.id === 'img') return undefined
return <HeaderCell col={col} setSortByValue={setSortByValue} />
return (
<HeaderCell
col={col}
specificFilterColumn={specificFilterColumn}
setSortByValue={setSortByValue}
/>
)
},
renderCell: ({ row }) => {
// This is actually a valid React component, so we can use hooks here
Expand Down
Loading
Loading