eschutho commented on a change in pull request #18629:
URL: https://github.com/apache/superset/pull/18629#discussion_r808452598



##########
File path: superset/views/base.py
##########
@@ -346,6 +346,16 @@ def common_bootstrap_payload() -> Dict[str, Any]:
 
     # should not expose API TOKEN to frontend
     frontend_config = {k: conf.get(k) for k in FRONTEND_CONF_KEYS}
+    frontend_config["EXCEL_EXTENSIONS"] = bool(
+        
bool(conf["EXCEL_EXTENSIONS"].intersection(conf["ALLOWED_EXTENSIONS"])),
+    )
+    frontend_config["CSV_EXTENSIONS"] = bool(
+        bool(conf["CSV_EXTENSIONS"].intersection(conf["ALLOWED_EXTENSIONS"])),
+    )
+    frontend_config["COLUMNAR_EXTENSIONS"] = bool(
+        
bool(conf["COLUMNAR_EXTENSIONS"].intersection(conf["ALLOWED_EXTENSIONS"])),

Review comment:
       This looks good, but to further simplify, wdyt about adding these keys 
to the FRONTEND_CONF_KEYS and then do the logic on the client side component? 
In other words, instead of this file being concerned with logic or the usage of 
this data, it just passes the data to the client and then the client only has 
to be concerned about the logic. 




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