You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/09/19 03:36:49 UTC
[GitHub] [airflow] jhtimmins opened a new pull request #11027: Replace get accessible dag ids
jhtimmins opened a new pull request #11027:
URL: https://github.com/apache/airflow/pull/11027
This PR builds on #10594 and replaces the calls to the old `get_accessible_dag_ids` with the newer `get_readable_dag_ids`. The new method uses resource-based permissions.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [airflow] kaxil merged pull request #11027: Replace get accessible dag ids
Posted by GitBox <gi...@apache.org>.
kaxil merged pull request #11027:
URL: https://github.com/apache/airflow/pull/11027
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [airflow] jhtimmins commented on a change in pull request #11027: Replace get accessible dag ids
Posted by GitBox <gi...@apache.org>.
jhtimmins commented on a change in pull request #11027:
URL: https://github.com/apache/airflow/pull/11027#discussion_r496360721
##########
File path: airflow/www/security.py
##########
@@ -307,28 +306,6 @@ def get_accessible_dags(self, user_action, user, session=None):
return session.query(DagModel).filter(DagModel.dag_id.in_(resources))
- def get_accessible_dag_ids(self, username=None):
Review comment:
Thanks @XD-DENG, good catch. Updated.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [airflow] kaxil commented on a change in pull request #11027: Replace get accessible dag ids
Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #11027:
URL: https://github.com/apache/airflow/pull/11027#discussion_r498376155
##########
File path: tests/www/test_security.py
##########
@@ -235,8 +244,17 @@ def test_access_control_with_invalid_permission(self):
'can_varimport', # a real permission, but not a member of DAG_PERMS
'can_eat_pudding', # clearly not a real permission
]
+ username = "Mrs. User"
Review comment:
Do we allow spaces in username ?
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [airflow] jhtimmins commented on a change in pull request #11027: Replace get accessible dag ids
Posted by GitBox <gi...@apache.org>.
jhtimmins commented on a change in pull request #11027:
URL: https://github.com/apache/airflow/pull/11027#discussion_r498376579
##########
File path: tests/www/test_security.py
##########
@@ -235,8 +244,17 @@ def test_access_control_with_invalid_permission(self):
'can_varimport', # a real permission, but not a member of DAG_PERMS
'can_eat_pudding', # clearly not a real permission
]
+ username = "Mrs. User"
Review comment:
Not sure. But for the sake of the test it doesn't impact behavior.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [airflow] XD-DENG commented on a change in pull request #11027: Replace get accessible dag ids
Posted by GitBox <gi...@apache.org>.
XD-DENG commented on a change in pull request #11027:
URL: https://github.com/apache/airflow/pull/11027#discussion_r493472025
##########
File path: airflow/www/security.py
##########
@@ -307,28 +306,6 @@ def get_accessible_dags(self, user_action, user, session=None):
return session.query(DagModel).filter(DagModel.dag_id.in_(resources))
- def get_accessible_dag_ids(self, username=None):
Review comment:
get_accessible_dag_ids() returns a SET, while get_readable_dag_ids() returns a LIST. This may bring some impacts.
----------------------------------------------------------------
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:
users@infra.apache.org