uranusjr commented on a change in pull request #19294:
URL: https://github.com/apache/airflow/pull/19294#discussion_r747335977



##########
File path: airflow/www/auth.py
##########
@@ -35,7 +35,7 @@ def decorated(*args, **kwargs):
             __tracebackhide__ = True  # Hide from pytest traceback.
 
             appbuilder = current_app.appbuilder
-            if not g.user.is_anonymous and not 
appbuilder.sm.current_user_has_permissions():
+            if not (g.user.is_anonymous or g.user.perms):

Review comment:
       I feel the previous version is a bit easier to understand (i.e. “not 
anonymous but does not have any permissions”)
   
   ```suggestion
               if not g.user.is_anonymous and not g.user.perms:
   ```




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


Reply via email to