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 2021/10/03 06:35:45 UTC

[GitHub] [airflow] uranusjr commented on a change in pull request #18670: Don't allow creating users via API unless DB auth type is used

uranusjr commented on a change in pull request #18670:
URL: https://github.com/apache/airflow/pull/18670#discussion_r720778409



##########
File path: airflow/api_connexion/endpoints/user_endpoint.py
##########
@@ -70,6 +70,13 @@ def get_users(limit, order_by='id', offset=None):
 @security.requires_access([(permissions.ACTION_CAN_CREATE, permissions.RESOURCE_USER)])
 def post_user():
     """Create a new user"""
+    import flask
+
+    from airflow.www.fab_security.manager import AUTH_DB

Review comment:
       Why not import globally?




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org