thomasbrockmeier commented on a change in pull request #4276: [AIRFLOW-1552] 
Airflow Filter_by_owner not working with password_auth
URL: https://github.com/apache/incubator-airflow/pull/4276#discussion_r239365754
 
 

 ##########
 File path: airflow/contrib/auth/backends/password_auth.py
 ##########
 @@ -106,8 +102,8 @@ def load_user(userid, session=None):
     if not userid or userid == 'None':
         return None
 
-    user = session.query(models.User).filter(models.User.id == 
int(userid)).first()
-    return PasswordUser(user)
+    user = session.query(PasswordUser).filter(PasswordUser.id == 
int(userid)).first()
 
 Review comment:
   My use case unfortunately requires DAG level access control. I have tried 
running master, but the DAG level roles available there do not seem to work on 
my machine.
   
   I have updated my code to leave the API alone, please let me know if there 
is anything else I can do to improve this PR.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to