villebro commented on code in PR #21515:
URL: https://github.com/apache/superset/pull/21515#discussion_r974544959


##########
tests/integration_tests/base_api_tests.py:
##########
@@ -288,6 +288,30 @@ def test_get_filter_related_owners(self):
         # TODO Check me
         assert expected_results == sorted_results
 
+    def test_get_base_filter_related_owners(self):
+        """
+        API: Test get base filter related owners
+        """
+        self.login(username="admin")
+        uri = f"api/v1/{self.resource_name}/related/owners"
+        self.app.config["EXCLUDE_USER_USERNAMES"] = ["gamma"]

Review Comment:
   Not something that needs to be tackled here, but wouldn't it be nice with a 
`with_config` decorator, similar to the `with_feature_flags` one?



##########
superset/config.py:
##########
@@ -1099,6 +1099,11 @@ def EMAIL_HEADER_MUTATOR(  # pylint: 
disable=invalid-name,unused-argument
     return msg
 
 
+# Define a list of usernames to be excluded from all dropdown lists of users
+# Owners, filters for created_by, etc.
+EXCLUDE_USER_USERNAMES: List[str] = []

Review Comment:
   I assume this is in reference to `User.username`, but wouldn't something 
like `EXCLUDE_USERS` or `EXCLUDE_USERNAMES` be perfectly understandable, as 
we're providing the type annotation `List[str]`? Also, should it perhaps 
mention that it's excluding from lists, so maybe something like 
`EXCLUDE_USERS_FROM_LISTS` could also work..
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to