Skip to content

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

fix: Lowercase the search term before searching users table (#31070)

Ivan Vasilovd08719e2bb67
diff --git a/apps/studio/components/interfaces/Auth/Users/UsersV2.tsx b/apps/studio/components/interfaces/Auth/Users/UsersV2.tsx
index 73d5dabc787..a2351632139 100644
--- a/apps/studio/components/interfaces/Auth/Users/UsersV2.tsx
+++ b/apps/studio/components/interfaces/Auth/Users/UsersV2.tsx
@@ -205,7 +205,7 @@ export const UsersV2 = () => {
onKeyDown={(e) => {
if (e.code === 'Enter') {
setSearch(search.trim())
- setFilterKeywords(search.trim())
+ setFilterKeywords(search.trim().toLocaleLowerCase())
}
}}
actions={[
diff --git a/apps/studio/components/interfaces/RoleImpersonationSelector/UserImpersonationSelector.tsx b/apps/studio/components/interfaces/RoleImpersonationSelector/UserImpersonationSelector.tsx
index 7672529eb08..e834e1422e5 100644
--- a/apps/studio/components/interfaces/RoleImpersonationSelector/UserImpersonationSelector.tsx
+++ b/apps/studio/components/interfaces/RoleImpersonationSelector/UserImpersonationSelector.tsx
@@ -32,7 +32,7 @@ const UserImpersonationSelector = () => {
{
projectRef: project?.ref,
connectionString: project?.connectionString,
- keywords: debouncedSearchText,
+ keywords: debouncedSearchText.trim().toLocaleLowerCase(),
},
{
keepPreviousData: true,
@@ -95,7 +95,7 @@ const UserImpersonationSelector = () => {
)
}
placeholder="Search for a user.."
- onChange={(e) => setSearchText(e.target.value.trim())}
+ onChange={(e) => setSearchText(e.target.value)}
value={searchText}
size="small"
actions={