Skip to content

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

Revert perms checking

Joshen Lim28928c8f4110
diff --git a/studio/components/layouts/StorageLayout/StorageMenu.tsx b/studio/components/layouts/StorageLayout/StorageMenu.tsx
index dd819c74513..bfbca13590a 100644
--- a/studio/components/layouts/StorageLayout/StorageMenu.tsx
+++ b/studio/components/layouts/StorageLayout/StorageMenu.tsx
@@ -22,7 +22,7 @@ const StorageMenu: FC<Props> = () => {
const { ref, bucketId } = useParams()
const [showCreateBucketModal, setShowCreateBucketModal] = useState(false)
const [selectedBucketToEdit, setSelectedBucketToEdit] = useState<StorageBucket>()
- const canCreateBuckets = checkPermissions(PermissionAction.UPDATE, 'projects')
+ const canCreateBuckets = checkPermissions(PermissionAction.STORAGE_ADMIN_WRITE, '*')
const page = router.pathname.split('/')[4] as
| undefined
diff --git a/studio/components/to-be-cleaned/Storage/StorageSettings/StorageSettings.tsx b/studio/components/to-be-cleaned/Storage/StorageSettings/StorageSettings.tsx
index 5c5b59eba5b..a604849edf0 100644
--- a/studio/components/to-be-cleaned/Storage/StorageSettings/StorageSettings.tsx
+++ b/studio/components/to-be-cleaned/Storage/StorageSettings/StorageSettings.tsx
@@ -44,7 +44,7 @@ const StorageConfig = ({ config, projectRef }: any) => {
const [selectedUnit, setSelectedUnit] = useState(unit)
let initialValues = { fileSizeLimit: value, unformattedFileSizeLimit: fileSizeLimit }
- const canUpdateStorageSettings = checkPermissions(PermissionAction.STORAGE_ADMIN_WRITE, '*')
+ const canUpdateStorageSettings = checkPermissions(PermissionAction.UPDATE, 'projects')
const formattedMaxSizeBytes = `${new Intl.NumberFormat('en-US').format(
STORAGE_FILE_SIZE_LIMIT_MAX_BYTES