youngyjd commented on a change in pull request #5787: Add schema level access 
control on csv upload
URL: 
https://github.com/apache/incubator-superset/pull/5787#discussion_r218959054
 
 

 ##########
 File path: superset/models/core.py
 ##########
 @@ -638,19 +638,19 @@ class Database(Model, AuditMixinNullable, ImportMixin):
     expose_in_sqllab = Column(Boolean, default=False)
     allow_run_sync = Column(Boolean, default=True)
     allow_run_async = Column(Boolean, default=False)
-    allow_csv_upload = Column(Boolean, default=True)
+    allow_csv_upload = Column(Boolean, default=False)
     allow_ctas = Column(Boolean, default=False)
     allow_dml = Column(Boolean, default=False)
     force_ctas_schema = Column(String(250))
     allow_multi_schema_metadata_fetch = Column(Boolean, default=True)
     extra = Column(Text, default=textwrap.dedent("""\
     {
         "metadata_params": {},
-        "engine_params": {}
+        "engine_params": {},
+        "schemas_allowed_for_csv_upload": []
 
 Review comment:
   Have to remove the trailing comma. Other wise it will show error `Expecting 
property name enclosed in double quotes: line 4 column 1 (char 57)` when I try 
to save a db. I guess it is related to json formatting issue?
   
   <img width="1170" alt="screen shot 2018-09-19 at 1 50 04 pm" 
src="https://user-images.githubusercontent.com/26216756/45780677-f0315c00-bc12-11e8-929d-56427a044c8f.png";>
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to