airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] thomasbrockmeier commented on a change in pull request #4276: [AIRFLOW-1552] Airflow Filter_by_owner not working with password_auth
Date Tue, 04 Dec 2018 15:54:03 GMT
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_r238721561
 
 

 ##########
 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:
   If it keeps the API from breaking, I can see if I can fix it in [views.py:2070](https://github.com/apache/incubator-airflow/blob/master/airflow/www/views.py#L2070)
with something like
   
   ```
       do_filter = FILTER_BY_OWNER and (not current_user.user.is_superuser())
   ```
   
   Not the nicest way to handle this, I guess, but perhaps worth considering if it enables
filtering DAGs by owner for the time being?
   
   Do you have any indication when 2.0.0 is scheduled for release? Depending on the time frame,
I may be able to invest a couple of hours to look into this further as this feature would
make my life a lot easier :)

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message