ashb commented on a change in pull request #11189:
URL: https://github.com/apache/airflow/pull/11189#discussion_r499712703



##########
File path: airflow/www/security.py
##########
@@ -320,33 +317,75 @@ def get_accessible_dags(self, user_actions, user, 
session=None):
             for permission in role.permissions:
                 resource = permission.view_menu.name
                 action = permission.permission.name
-                if action in user_actions:
+                if action not in user_actions:
+                    continue
+
+                if resource.startswith(DAG_PREFIX):
+                    resources.add(resource[len(DAG_PREFIX) :])
+                else:
                     resources.add(resource)
 
-        if bool({'Dag', 'all_dags'}.intersection(resources)):
+        if 'Dag' in resources:

Review comment:
       I think this should _possibly_ be the exception to the resource naming 
convention, and call this "All Dags"




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


Reply via email to