jedcunningham commented on a change in pull request #15311:
URL: https://github.com/apache/airflow/pull/15311#discussion_r612664757
##########
File path: airflow/www/security.py
##########
@@ -516,24 +515,25 @@ def _get_all_roles_with_permissions(self) -> Dict[str,
Role]:
def create_dag_specific_permissions(self) -> None:
"""
- Creates 'can_read' and 'can_edit' permissions for all active and
paused DAGs.
+ Creates 'can_read' and 'can_edit' permissions for all active and
paused DAGs,
+ along with any `access_control` permissions provided in the DAG.
:return: None.
"""
perms = self.get_all_permissions()
- rows = (
- self.get_session.query(models.DagModel.dag_id)
- .filter(or_(models.DagModel.is_active, models.DagModel.is_paused))
Review comment:
The new approach is the one already taken by the cli and is, from what I
can tell, the more complete approach. I believe using
`DagBag.collect_dags_from_db` is equivalent to `is_active` (as missing DAGs are
removed from `SerializedDagModel`). `is_paused`, not sure why that was
explicitly included here but I don't think it needs to be.
--
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]