Antonio-RiveroMartnez commented on code in PR #21065:
URL: https://github.com/apache/superset/pull/21065#discussion_r951777459
##########
superset/db_engine_specs/base.py:
##########
@@ -1594,6 +1598,17 @@ def get_impersonation_key(cls, user: Optional[User]) ->
Any:
"""
return user.username if user else None
+ @classmethod
+ def get_public_information(cls) -> Dict[str, Any]:
+ """
+ Construct a Dict with properties we want to expose.
+
+ :returns: Dict with properties of our class like allows_file_upload
+ """
+ return {
+ "allows_file_upload": cls.allows_file_upload,
Review Comment:
The `allow_file_upload` is in the `Database` model and it's set per each
user's DB. While the `allows_file_upload` is set in the `DB Engine Spec` and
cannot be set by the user. So, even when a `Database` has its flag set to true
(think of existing user's DB), if its `DB Engine Spec` doesn't support it, we
prevent file uploading to it.
--
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]