Vitor-Avila opened a new pull request, #33916:
URL: https://github.com/apache/superset/pull/33916
### SUMMARY
This PR fixes an issue that was preventing limited roles (for example,
`Alpha`) to get a list of tables and views from a DB. This would happen for DBs
that support `multi_catalog` but had **Allow changing catalogs** disabled. The
issue:
1. The DB metadata dropdowns would not include a **Catalog** option.
2. The API call fired by the client to
`/api/v1/database/${DB_CONNECTION_ID}/tables` would not specify the catalog to
use.
3. Backend logic would use `None` as opposed to the connection's default
catalog.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
No UI changes.
### TESTING INSTRUCTIONS
Added test coverage. For manual testing:
1. Connect a DB that supports multi_catalog. Make sure that **Allow changing
catalogs** is disabled.
2. Create one dataset from this connection.
3. Create a test user and grant this account the `Alpha` and `sql_lab` roles.
4. Grant this user access to the dataset created in step 3.
5. While logged in with the test account, navigate to **SQL > SQL Lab**.
6. Select the DB and schema in the dropdowns.
7. Confirm the table list is displayed as well.
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in
[SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]