XD-DENG commented on a change in pull request #4833: [AIRFLOW-4006] Make better 
use of Set in AirflowSecurityManager
URL: https://github.com/apache/airflow/pull/4833#discussion_r262294813
 
 

 ##########
 File path: airflow/www/security.py
 ##########
 @@ -233,8 +233,8 @@ def get_all_permissions_views(self):
         """
         perms_views = set()
         for role in self.get_user_roles():
-            for perm_view in role.permissions:
-                perms_views.add((perm_view.permission.name, 
perm_view.view_menu.name))
+            perms_views = perms_views | {(perm_view.permission.name, 
perm_view.view_menu.name)
+                                         for perm_view in role.permissions}
 
 Review comment:
   Rebased and made the change mentioned above.
   
   Please let me know if anything looks incorrect. Thanks!

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to