Skip to content

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

Show warning when rls is turned off

Terry Sutton39041af093d4
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx
index baa02b2921d..dcfe815c680 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx
@@ -212,15 +212,26 @@ const TableEditor: FC<Props> = ({
// @ts-ignore
description={
<>
- Restrict access to your table by enabling RLS and writing Postgres policies.
- <br />
- If RLS is not enabled, anyone with the anon key can modify and delete your data.
+ <p>
+ Restrict access to your table by enabling RLS and writing Postgres policies.
+ </p>
+
+ <p>
+ If RLS is not enabled, anyone with the anon key can modify and delete your data.
+ </p>
+ {!tableFields.isRLSEnabled && (
+ <p className="mt-3 bg-yellow-300 p-2 transition">
+ Turning off RLS means that you are allowing <u>anonymous access</u> to your
+ table.
+ </p>
+ )}
</>
}
checked={tableFields.isRLSEnabled}
onChange={() => onUpdateField({ isRLSEnabled: !tableFields.isRLSEnabled })}
size="medium"
/>
+
<Checkbox
id="enable-realtime"
label="Enable Realtime"