villebro commented on a change in pull request #14684:
URL: https://github.com/apache/superset/pull/14684#discussion_r636663886
##########
File path: superset/connectors/sqla/views.py
##########
@@ -369,6 +371,15 @@ class RowLevelSecurityFiltersModelView( # pylint:
disable=too-many-ancestors
add_form_query_rel_fields = app.config["RLS_FORM_QUERY_REL_FIELDS"]
edit_form_query_rel_fields = add_form_query_rel_fields
+ @staticmethod
+ def is_enabled() -> bool:
+ return is_feature_enabled("ROW_LEVEL_SECURITY")
+
+ @before_request
+ def ensure_enabled(self) -> None:
+ if not self.is_enabled():
+ raise NotFound()
Review comment:
Gotcha - I don't have the full picture of the context in which this
change is used, so some of my comments will probably be irrelevant 👍
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]