From dc8fdfdee59136b2b324042622ed012b296e4fa9 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 9 Mar 2023 05:23:39 +0300 Subject: auth: data migration: Data migration outline Provide an outline of the data migration steps to be taken from some results of the experiments with the data in redis. --- gn3/auth/authorisation/users/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gn3/auth/authorisation/users/views.py') diff --git a/gn3/auth/authorisation/users/views.py b/gn3/auth/authorisation/users/views.py index 5015cac..e3901b4 100644 --- a/gn3/auth/authorisation/users/views.py +++ b/gn3/auth/authorisation/users/views.py @@ -51,7 +51,8 @@ def user_roles() -> Response: return jsonify(tuple( dictify(role) for role in _user_roles(conn, token.user))) -def __valid_password__(password, confirm_password) -> str: +def validate_password(password, confirm_password) -> str: + """Validate the provided password.""" if len(password) < 8: raise PasswordError("The password must be at least 8 characters long.") @@ -85,7 +86,7 @@ def register_user() -> Response: form = request.form email = validate_email(form.get("email", "").strip(), check_deliverability=True) - password = __valid_password__( + password = validate_password( form.get("password", "").strip(), form.get("confirm_password", "").strip()) user_name = __valid_username__(form.get("user_name", "").strip()) -- cgit v1.2.3