feng-tao commented on a change in pull request #4624: [AIRFLOW-3787] 
Import/export users from JSON file
URL: https://github.com/apache/airflow/pull/4624#discussion_r252388835
 
 

 ##########
 File path: airflow/bin/cli.py
 ##########
 @@ -1474,6 +1474,107 @@ def users(args):
                 print('User "{}" added to role "{}".'.format(
                     user,
                     args.role))
+    elif args.export:
+        appbuilder = cached_appbuilder()
+        users = appbuilder.sm.get_all_users()
+        fields = ['id', 'username', 'email', 'first_name', 'last_name', 
'roles']
+
+        # In the User model the first and last name fields have underscores,
+        # but the corresponding parameters in the CLI don't
 
 Review comment:
   I am not sure if I understand the comment, could you clarify which part of 
cli doesn't allow the underscore?

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