mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
## Problem Some permissions require others to actually have an effect, for instance: - `api_gateway_keys_secret_read` requires `api_gateway_keys_read` or `api_gateway_keys_write` - `data_api_config_secret_read` requires `data_api_config_read` or `data_api_config_write` This is not obvious from a user perspective. ## Solution We decided to make these requirements explicit by: - Adding a line in the permission item stating the dependency - Disabling the permission if its dependency isn't met - Resetting the permission if it was selected but the dependencies aren't met anymore ## How to test - On [staging](https://studio-staging-git-gildasgarcia-fe-4380-dashboa-b2a227-supabase.vercel.app/dashboard/account/tokens) - Create a new token - Check that _API Key Secrets_ is greyed out and disabled - Select _API Key_ read or read-write - _API Key Secrets_ shouldn't be greyed out and disabled - Select a value for _API Key Secrets_ - Set _API Key_ to none - Check that _API Key Secrets_ is greyed out, disabled and reset to none too <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added dependency-aware permissions for scoped access tokens. - Permission descriptions now show required dependencies and permission levels. - Dependent permissions automatically reset to “None” when requirements are not met. - Permission controls and unavailable selections reflect dependency requirements. - **Accessibility** - Screen readers now receive an announcement when a permission is reset to “None” due to unmet dependencies. <!-- end of auto-generated comment: release notes by coderabbit.ai -->