ephraimbuddy commented on code in PR #23510:
URL: https://github.com/apache/airflow/pull/23510#discussion_r866840267
##########
tests/www/test_security.py:
##########
@@ -190,9 +190,13 @@ def sample_dags(security_manager):
@pytest.fixture(scope="module")
-def has_dag_perm(security_manager):
+def has_dag_perm(security_manager, session):
def _has_dag_perm(perm, dag_id, user):
- return security_manager.has_access(perm,
permissions.resource_name_for_dag(dag_id), user)
+ is_subdag = False
+ dm = session.query(DagModel).filter(DagModel.dag_id == dag_id).first()
+ if dm:
+ is_subdag = dm.is_subdag
Review Comment:
```suggestion
is_subdag = security_manager._is_subdag(dag_id)
```
--
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]