"Create Resource" option available on SGCluster form when user has no permissions
Summary
When creating an SGCluster from the web console, it is possible for users to create configurations and other resources by clicking on the "Create New" from the dropdown selectors. Even for users who have no permission to create the specified resource, this option is still available.
Steps to reproduce
- Create a user with permissions to create SGClusters but no permissions to create dependencies (SGInstanceProfiles, SGPostgresConfigs, etc.)
- Log in to the web console with the specified user
- Enter the Create Cluster form
- Toggle the corresponding dependencies dropdown
- The option to create the dependency will appear even though it shouldn't
Expected Behaviour
There should be no CTAs on the web console for operations the user is not allowed to do
Possible Solution
Validate RBAC permissions before loading the "create" option
Environment
- StackGres version:
1.2.0-RC