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 2019/05/01 02:41:21 UTC

[GitHub] [airflow] chrismclennon commented on a change in pull request #5220: [AIRFLOW-4450] has_dag_access does not use correct request arguments from POST endpoints

chrismclennon commented on a change in pull request #5220: [AIRFLOW-4450] has_dag_access does not use correct request arguments from POST endpoints
URL: https://github.com/apache/airflow/pull/5220#discussion_r279996294
 
 

 ##########
 File path: airflow/www/decorators.py
 ##########
 @@ -101,8 +101,10 @@ def has_dag_access(**dag_kwargs):
     def decorator(f):
         @functools.wraps(f)
         def wrapper(self, *args, **kwargs):
+            request_arguments = request.args.to_dict()
+            request_arguments.update(request.form.to_dict())
 
 Review comment:
   Yup, request.args will take in URL parameters from GET, POST, and PUT. request.form takes in the form parameters. At least on the environment we're running on we confirmed that this wrapper works for both GET endpoints and the POST endpoint with form data.

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


With regards,
Apache Git Services