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


##########
superset/security/manager.py:
##########
@@ -1702,6 +1702,22 @@ def on_permission_view_after_delete(
         :param target: The mapped instance being persisted
         """
 
+    @staticmethod
+    def get_exclude_users_from_lists() -> List[str]:
+        """
+        Override to dynamically identify a list of usernames to exclude from
+        all UI dropdown lists, owners, created_by filters etc...
+
+        It will exclude all users from the all endpoints of the form
+        ``/api/v1/<modelview>/related/<column>``
+
+        Optionally you can also exclude them using the 
`EXCLUDE_USERS_FROM_LISTS`
+        config setting.
+
+        :return: A list of usernames
+        """
+        return []

Review Comment:
   I could, but why make an extra query to fetch an ID? 
   Service users normally have pre-defined usernames, does not seem common 
practice to me to identify users on a config key by user IDs. There are lot's 
of cases of pre-defined usernames for service users or special well known 
users: postgres, root, rdsadmin, rdsrepladmin, operator, backup, guest, 
anonymous, QSECOFR. We just assume these names will not change.
   
    



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