XD-DENG commented on a change in pull request #12516:
URL: https://github.com/apache/airflow/pull/12516#discussion_r527969425
##########
File path: airflow/www/security.py
##########
@@ -520,7 +520,6 @@ def update_admin_perm_view(self):
:return: None.
"""
- all_dag_view = self.find_view_menu(permissions.RESOURCE_DAG)
dag_pvs = (
self.get_session.query(sqla_models.ViewMenu)
.filter(sqla_models.ViewMenu.name.like(f"{permissions.RESOURCE_DAG_PREFIX}%"))
Review comment:
if the ViewMenu name is like `RESOURCE_DAG_PREFIX` ("DAG:"), we can
already be very sure that the resulting `pv_ids` doesn't include the id of
`RESOURCE_DAG ` ("DAGs").
Hence in the following SQL query, we don't need to have the 2nd condition in
the `and_()`
----------------------------------------------------------------
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]