betodealmeida commented on code in PR #29884:
URL: https://github.com/apache/superset/pull/29884#discussion_r1718688120
##########
superset/databases/api.py:
##########
@@ -2274,6 +2274,6 @@ def schemas_access_for_file_upload(self, pk: int) ->
Response:
# otherwise the database should have been filtered out
# in CsvToDatabaseForm
schemas_allowed_processed =
security_manager.get_schemas_accessible_by_user(
- database, schemas_allowed, True
+ database, None, schemas_allowed, True
Review Comment:
Ah, yeah, we need to implement support for catalogs in the CSV upload
feature.
Every time you need a catalog in a function and one is not explicitly passed
you should use `database.get_default_catalog()` — it will return `None` for
databases that don't support catalogs, and the default catalog for those that
do.
In this case, we need to pass `database.get_default_catalog()` to
`get_schemas_accessible_by_user`, otherwise the permissions check won't match
if the database supports catalogs.
--
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]