Skip to content

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

Add a proper alert to the rls page

Terry Sutton32c590655ce1
diff --git a/studio/components/interfaces/Auth/Policies/PolicyTableRow/index.tsx b/studio/components/interfaces/Auth/Policies/PolicyTableRow/index.tsx
index 4b943903e45..a1ebc007bff 100644
--- a/studio/components/interfaces/Auth/Policies/PolicyTableRow/index.tsx
+++ b/studio/components/interfaces/Auth/Policies/PolicyTableRow/index.tsx
@@ -45,9 +45,18 @@ const PolicyTableRow: FC<Props> = ({
<div className="p-4 px-6 space-y-1">
<p className="text-scale-1100 text-sm">No policies created yet</p>
{table.rls_enabled ? (
- <p className="text-scale-1000 text-sm">
- RLS is enabled - create a policy to allow access to this table.
- </p>
+ <Alert
+ withIcon
+ variant="info"
+ className="!px-4 !py-3 !mt-3"
+ title="RLS is on. However, policies are required to query data."
+ >
+ <p>
+ You need to write an access policy before you can query data from this table.
+ Without a policy, querying this table will result in an <u>empty array</u> of
+ results.
+ </p>
+ </Alert>
) : (
<Alert
withIcon
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx
index 2b1f7321293..7147cd6e748 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx
@@ -255,8 +255,9 @@ const TableEditor: FC<Props> = ({
title="RLS is on. However, policies are required to query data."
>
<p>
- You need to write a policy before you can query data from this table. Without a
- policy, querying this table will result in an <u>empty array</u> of results.
+ You need to write an access policy before you can query data from this table.
+ Without a policy, querying this table will result in an <u>empty array</u> of
+ results.
</p>
<p className="mt-4">
<Link href="https://supabase.com/docs/guides/auth/row-level-security">