Skip to content

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

Update Roles helper modal content

Joshen Limdfbd0d327f95
diff --git a/studio/components/interfaces/Organization/TeamSettings/RolesHelperModal/RolesHelperModal.constants.ts b/studio/components/interfaces/Organization/TeamSettings/RolesHelperModal/RolesHelperModal.constants.ts
index c37e4e54d24..5ed8b2d051f 100644
--- a/studio/components/interfaces/Organization/TeamSettings/RolesHelperModal/RolesHelperModal.constants.ts
+++ b/studio/components/interfaces/Organization/TeamSettings/RolesHelperModal/RolesHelperModal.constants.ts
@@ -119,7 +119,7 @@ const BILLING_PERMISSIONS = {
owner: true,
admin: true,
developer: true,
- read_only: false,
+ read_only: true,
billing_only: true,
},
},
@@ -129,7 +129,7 @@ const BILLING_PERMISSIONS = {
owner: true,
admin: true,
developer: true,
- read_only: false,
+ read_only: true,
billing_only: true,
},
},
@@ -149,7 +149,7 @@ const BILLING_PERMISSIONS = {
owner: true,
admin: true,
developer: true,
- read_only: false,
+ read_only: true,
billing_only: true,
},
},
@@ -169,7 +169,7 @@ const BILLING_PERMISSIONS = {
owner: true,
admin: true,
developer: true,
- read_only: false,
+ read_only: true,
billing_only: true,
},
},
@@ -189,7 +189,7 @@ const BILLING_PERMISSIONS = {
owner: true,
admin: true,
developer: true,
- read_only: false,
+ read_only: true,
billing_only: true,
},
},
@@ -209,7 +209,7 @@ const BILLING_PERMISSIONS = {
owner: true,
admin: true,
developer: true,
- read_only: false,
+ read_only: true,
billing_only: true,
},
},
@@ -299,6 +299,428 @@ const PROJECT_PERMISSIONS = {
billing_only: false,
},
},
+ {
+ description: 'Can read API anon keys',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: true,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can read API secret keys',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: false,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can read JWT secret',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: false,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can generate new JWT secret',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: false,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can update API settings',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: false,
+ billing_only: false,
+ },
+ },
+ ],
+}
+
+const DATABASE_PERMISSIONS = {
+ title: 'Database',
+ actions: [
+ {
+ description: 'Can read tables',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: true,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can create/update/delete tables',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: false,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can read RLS policies',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: true,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can read create/update/delete RLS policies',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: false,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can read database extensions',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: true,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can read update database extensions',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: false,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can read scheduled database backups',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: true,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can trigger a scheduled database backup',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: false,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can read PITR database backups',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: true,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can trigger a PITR database backup',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: false,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can read database replications',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: true,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can update database replications',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: false,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can read database triggers',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: true,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can create/update/delete database triggers',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: false,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can read database functions',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: true,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can create/update/delete database functions',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: false,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can read database webhooks',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: true,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can create/update/delete database webhooks',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: false,
+ billing_only: false,
+ },
+ },
+ ],
+}
+
+const SQL_EDITOR_PERMISSIONS = {
+ title: 'SQL Editor',
+ actions: [
+ {
+ description: 'Can run a SELECT-based query',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: true,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can run all other types of queries',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: false,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can create/update/delete queries',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: true,
+ billing_only: false,
+ },
+ },
+ ],
+}
+
+const STORAGE_PERMISSIONS = {
+ title: 'Storage',
+ actions: [
+ {
+ description: 'Can access storage',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: false,
+ billing_only: false,
+ },
+ },
+ ],
+}
+
+const AUTHENTICATION_PERMISSIONS = {
+ title: 'Authentication',
+ actions: [
+ {
+ description: 'Can view users',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: true,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can remove users',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: false,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can invite users',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: false,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can read authentication settings',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: true,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can update authentication settings',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: false,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can view authentication logs',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: true,
+ billing_only: false,
+ },
+ },
+ ],
+}
+
+const EDGE_FUNCTIONS_PERMISSIONS = {
+ title: 'Edge Functions',
+ actions: [
+ {
+ description: 'Can view edge functions',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: true,
+ billing_only: false,
+ },
+ },
+ ],
+}
+
+const LOGS_EXPLORER_PERMISSIONS = {
+ title: 'Logs Explorer',
+ actions: [
+ {
+ description: 'Can view logs explorer',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: true,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can create queries in the logs explorer',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: true,
+ billing_only: false,
+ },
+ },
+ ],
+}
+
+const REPORTS_PERMISSIONS = {
+ title: 'Reports',
+ actions: [
+ {
+ description: 'Can view reports',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: true,
+ billing_only: false,
+ },
+ },
+ {
+ description: 'Can create/update a report',
+ permissions: {
+ owner: true,
+ admin: true,
+ developer: true,
+ read_only: false,
+ billing_only: false,
+ },
+ },
],
}
@@ -307,4 +729,11 @@ export const PERMISSIONS_MAPPING = [
MEMBERS_MANAGEMENT_PERMISSIONS,
BILLING_PERMISSIONS,
PROJECT_PERMISSIONS,
+ DATABASE_PERMISSIONS,
+ SQL_EDITOR_PERMISSIONS,
+ STORAGE_PERMISSIONS,
+ AUTHENTICATION_PERMISSIONS,
+ EDGE_FUNCTIONS_PERMISSIONS,
+ LOGS_EXPLORER_PERMISSIONS,
+ REPORTS_PERMISSIONS,
]