Vitor-Avila commented on code in PR #32702:
URL: https://github.com/apache/superset/pull/32702#discussion_r1999347601


##########
superset/databases/api.py:
##########
@@ -776,18 +776,38 @@ def schemas(self, pk: int, **kwargs: Any) -> 
FlaskResponse:
         if not database:
             return self.response_404()
         try:
-            catalog = kwargs["rison"].get("catalog")
+            params = kwargs["rison"]
+            catalog = params.get("catalog")
             schemas = database.get_all_schema_names(
                 catalog=catalog,
                 cache=database.schema_cache_enabled,
                 cache_timeout=database.schema_cache_timeout or None,
-                force=kwargs["rison"].get("force", False),
+                force=params.get("force", False),
             )
             schemas = security_manager.get_schemas_accessible_by_user(
                 database,
                 catalog,
                 schemas,
             )
+            if params.get("upload_allowed"):
+                if not database.allow_file_upload:
+                    return self.response(
+                        400,
+                        message="File upload is disabled on this database 
connection",
+                    )

Review Comment:
   sure! I think that makes sense (if file upload is disabled no schema is 
allowed). I'll do that + fix the frontend test shortly



-- 
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]

Reply via email to