Skip to content

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

Add ABAC chekc

Joshen Lim143fa7aa0df7
diff --git a/studio/components/interfaces/Settings/General/Infrastructure/RestartServerButton.tsx b/studio/components/interfaces/Settings/General/Infrastructure/RestartServerButton.tsx
index 8d7478a71d6..2818bcc7707 100644
--- a/studio/components/interfaces/Settings/General/Infrastructure/RestartServerButton.tsx
+++ b/studio/components/interfaces/Settings/General/Infrastructure/RestartServerButton.tsx
@@ -41,6 +41,12 @@ const RestartServerButton: FC<Props> = ({ project }) => {
}
const requestDatabaseRestart = async () => {
+ if (!canRestartProject) {
+ return ui.setNotification({
+ category: 'error',
+ message: 'You do not have the required permissions to restart this project',
+ })
+ }
setLoading(true)
const res = await post(`${API_URL}/projects/${projectRef}/restart-services`, {
restartRequest: {