aboutsummaryrefslogtreecommitdiff
path: root/gn3/auth/authorisation/users
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-03-09 05:23:39 +0300
committerFrederick Muriuki Muriithi2023-03-09 05:23:39 +0300
commitdc8fdfdee59136b2b324042622ed012b296e4fa9 (patch)
tree62028df63cfe8f1837efd7228d2ec2c2c8f94c67 /gn3/auth/authorisation/users
parentdee42dd14dc7786b1ccf9465bb28dfe74024166c (diff)
downloadgenenetwork3-dc8fdfdee59136b2b324042622ed012b296e4fa9.tar.gz
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.
Diffstat (limited to 'gn3/auth/authorisation/users')
-rw-r--r--gn3/auth/authorisation/users/views.py5
1 files changed, 3 insertions, 2 deletions
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())