aritra24 commented on code in PR #37044:
URL: https://github.com/apache/airflow/pull/37044#discussion_r1468807594
##########
airflow/providers/fab/auth_manager/cli_commands/user_command.py:
##########
@@ -106,6 +106,27 @@ def _find_user(args):
return user
+@cli_utils.action_cli
+@providers_configuration_loaded
+def user_reset_password(args):
+ """Reset user password user from DB."""
+ user = _find_user(args)
+ if args.use_random_password:
+ password = "".join(random.choices(string.printable, k=16))
+ elif args.password:
+ password = args.password
+ else:
+ password = getpass.getpass("Password:")
+ password_confirmation = getpass.getpass("Repeat for confirmation:")
+ if password != password_confirmation:
+ raise SystemExit("Passwords did not match")
Review Comment:
done
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]