You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2023/01/09 02:56:26 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #28781: Fix UIAlert should_show when AUTH_ROLE_PUBLIC set

uranusjr commented on code in PR #28781:
URL: https://github.com/apache/airflow/pull/28781#discussion_r1064255188


##########
airflow/www/utils.py:
##########
@@ -820,10 +822,25 @@ def __init__(
         self.html = html
         self.message = Markup(message) if html else message
 
-    def should_show(self, securitymanager) -> bool:
-        """Determine if the user should see the message based on their role membership"""
+    def should_show(self, securitymanager: SecurityManager) -> bool:
+        """
+        Determine if the user should see the message based on their role membership.
+        If the user is anonymous and AUTH_ROLE_PUBLIC is set in webserver_config.py,
+        provide that user with the AUTH_ROLE_PUBLIC role.
+        """

Review Comment:
   ```suggestion
           """Determine if the user should see the message.
           
           The decision is based on the user's role. If ``AUTH_ROLE_PUBLIC`` is set
           in ``webserver_config.py``, An anonymous user would have the
           ``AUTH_ROLE_PUBLIC`` role.
           """
   ```



-- 
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: commits-unsubscribe@airflow.apache.org

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