altef commented on a change in pull request #8699: [SIP-29] Add support for
row-level security
URL:
https://github.com/apache/incubator-superset/pull/8699#discussion_r370522615
##########
File path: superset/connectors/sqla/views.py
##########
@@ -225,6 +225,48 @@ class SqlMetricInlineView(CompactCRUDMixin,
SupersetModelView):
edit_form_extra_fields = add_form_extra_fields
+class RowLevelSecurityFiltersModelView(SupersetModelView, DeleteMixin):
+ datamodel = SQLAInterface(models.RowLevelSecurityFilter)
+
+ list_title = _("Row level security filter")
+ show_title = _("Show Row level security filter")
+ add_title = _("Add Row level security filter")
+ edit_title = _("Edit Row level security filter")
+
+ list_columns = ["table", "roles", "clause", "creator", "modified"]
+ order_columns = ["modified"]
+ edit_columns = ["table", "roles", "clause"]
+ show_columns = edit_columns
+ search_columns = ("table", "roles", "clause")
+ add_columns = edit_columns
+ base_order = ("changed_on", "desc")
+ description_columns = {
+ "table": _("This is the table this filter will be applied to."),
+ "roles": _("These are the roles this filter will be applied to."),
+ "clause": _(
+ "This is the condition that will be added to the WHERE clause. "
+ "For example, to only return rows for a particular client, you
might put in: client_id = 9"
+ ),
+ }
+ label_columns = {
+ "table": _("Table"),
+ "roles": _("Roles"),
+ "clause": _("Clause"),
+ "creator": _("Creator"),
+ "modified": _("Modified"),
+ }
+
+
+appbuilder.add_view(
Review comment:
_moved_
----------------------------------------------------------------
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.
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]