mayurnewase commented on code in PR #22325:
URL: https://github.com/apache/superset/pull/22325#discussion_r1056997651


##########
superset/config.py:
##########
@@ -1293,15 +1294,16 @@ def EMAIL_HEADER_MUTATOR(  # pylint: 
disable=invalid-name,unused-argument
 }
 
 # It is possible to customize which tables and roles are featured in the RLS
-# dropdown. When set, this dict is assigned to `add_form_query_rel_fields` and
-# `edit_form_query_rel_fields` on `RowLevelSecurityFiltersModelView`. Example:
+# dropdown. When set, this dict is assigned to `filter_rel_fields`
+# on `RLSRestApi`. Example:
 #
 # from flask_appbuilder.models.sqla import filters
-# RLS_FORM_QUERY_REL_FIELDS = {
-#     "roles": [["name", filters.FilterStartsWith, "RlsRole"]]
-#     "tables": [["table_name", filters.FilterContains, "rls"]]
+
+# RLS_FILTER_RELATED_FIELDS = {
+#     "tables": [["table_name", filters.FilterStartsWith, "birth"]],
+#     "roles": [["name", filters.FilterContains, "Admin"]]
 # }
-RLS_FORM_QUERY_REL_FIELDS: Optional[Dict[str, List[List[Any]]]] = None
+RLS_FILTER_RELATED_FIELDS: Dict[str, BaseFilter] = {}

Review Comment:
   also how to keep the compatibility?
   keep both flags in config and in the api do like below?
   ```
   if app.config["RLS_FORM_QUERY_REL_FIELDS"]:
        logger.warning()
       base_related_field_filters = app.config["RLS_FORM_QUERY_REL_FIELDS"]
   
   elif app.config["RLS_FILTER_RELATED_FIELDS"]:
        base_related_field_filters = app.config["RLS_FILTER_RELATED_FIELDS"]
   ```



-- 
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: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to