From f4a5314f6e1f6e89072e35736aacb47e932b13cf Mon Sep 17 00:00:00 2001 From: Terry Sutton Date: Mon, 25 Apr 2022 16:07:57 -0230 Subject: [PATCH 1/2] Add a link to the RLS settings page when RLS is enabled --- .../TableGridEditor/GridHeaderActions.tsx | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/studio/components/interfaces/TableGridEditor/GridHeaderActions.tsx b/studio/components/interfaces/TableGridEditor/GridHeaderActions.tsx index 96f1d3a6311..d6aa813cbdb 100644 --- a/studio/components/interfaces/TableGridEditor/GridHeaderActions.tsx +++ b/studio/components/interfaces/TableGridEditor/GridHeaderActions.tsx @@ -1,6 +1,6 @@ import { FC } from 'react' import Link from 'next/link' -import { Badge, Button, IconAlertCircle, Typography } from '@supabase/ui' +import { Button, IconAlertCircle, IconLock } from '@supabase/ui' import { PostgresTable } from '@supabase/postgres-meta' import { useStore } from 'hooks' @@ -16,18 +16,13 @@ const GridHeaderActions: FC = ({ table }) => { return (
- {!table.rls_enabled && ( - - - - )} - {/* */} +
) } From 0d74ae67bc036273499a3da7228bf2ff1721dac3 Mon Sep 17 00:00:00 2001 From: Terry Sutton Date: Mon, 2 May 2022 14:35:35 -0230 Subject: [PATCH 2/2] Only show RLS link on public schema tables --- .../components/interfaces/TableGridEditor/TableGridEditor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/studio/components/interfaces/TableGridEditor/TableGridEditor.tsx b/studio/components/interfaces/TableGridEditor/TableGridEditor.tsx index 5b8f12db0be..7adaa5c79af 100644 --- a/studio/components/interfaces/TableGridEditor/TableGridEditor.tsx +++ b/studio/components/interfaces/TableGridEditor/TableGridEditor.tsx @@ -139,7 +139,7 @@ const TableGridEditor: FC = ({ schema={selectedTable.schema} table={gridTable} headerActions={ - !isViewSelected && + !isViewSelected && selectedTable.schema === 'public' && } onAddColumn={onAddColumn} onEditColumn={onSelectEditColumn}