Skip to content

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

fix(studio): prevent users not permitted or on protected schemas to edit triggers (#41312)

Marouane Souda78fd7350f95f
diff --git a/apps/studio/components/interfaces/Database/Triggers/TriggersList/TriggerList.tsx b/apps/studio/components/interfaces/Database/Triggers/TriggersList/TriggerList.tsx
index 195df148fa4..ca5e231a6b1 100644
--- a/apps/studio/components/interfaces/Database/Triggers/TriggersList/TriggerList.tsx
+++ b/apps/studio/components/interfaces/Database/Triggers/TriggersList/TriggerList.tsx
@@ -99,9 +99,10 @@ export const TriggerList = ({
<TableCell className="space-x-2">
<Button
type="text"
+ disabled={isLocked || !canUpdateTriggers}
onClick={() => editTrigger(x)}
title={x.name}
- className="text-link-table-cell text-left text-sm min-w-0 p-0 hover:bg-transparent font-medium max-w-48 title"
+ className="text-link-table-cell text-left text-sm disabled:opacity-90 disabled:no-underline min-w-0 p-0 hover:bg-transparent font-medium max-w-48 title"
>
{x.name}
</Button>