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

 ##########
 File path: superset/forms.py
 ##########
 @@ -66,8 +108,14 @@ def csv_enabled_dbs():
             FileRequired(), FileAllowed(['csv'], _('CSV Files Only!'))])
     con = QuerySelectField(
         _('Database'),
-        query_factory=csv_enabled_dbs,
+        query_factory=csv_allowed_dbs,
         get_pk=lambda a: a.id, get_label=lambda a: a.database_name)
+    schema = StringField(
+        _('Schema'),
+        description=_('Specify a schema (if database flavour supports this).'),
+        validators=[Optional()],
+        widget=BS3TextFieldWidget(),
+        filters=[lambda x: x or None])
 
 Review comment:
   Why do we need the `or None` here? Is it a way of casting falsy values (`0`, 
`[]`, `''`) to `None`?

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