From cdfe84908987d94034ed8bc435084ccdebd8cc30 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 26 Aug 2026 15:38:44 +0000 Subject: feat(admin/users): implement create_verified_user Replaces the dummy stub with a real implementation that: - calls save_user(cursor, email, name, verified=True) to create the user with the verified flag set, bypassing the email verification flow - calls set_user_password to store the hashed credential in user_credentials - returns the newly created User with no roles assigned Co-Authored-By: Claude Sonnet 4.6 Reviewed-By: Frederick M. Muriithi --- gn_auth/auth/authorisation/users/admin/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gn_auth/auth/authorisation/users/admin/models.py') diff --git a/gn_auth/auth/authorisation/users/admin/models.py b/gn_auth/auth/authorisation/users/admin/models.py index 71c4ffc..65db8cc 100644 --- a/gn_auth/auth/authorisation/users/admin/models.py +++ b/gn_auth/auth/authorisation/users/admin/models.py @@ -2,9 +2,10 @@ import warnings from gn_auth.auth.db import sqlite3 as db -from gn_auth.auth.authentication.users import User, DUMMY_USER +from gn_auth.auth.authentication.users import User from gn_auth.auth.authorisation.roles.models import Role, db_rows_to_roles from gn_auth.auth.authorisation.resources.system.models import system_resource +from gn_auth.auth.authorisation.users.models import create_credentialed_user def sysadmin_role(conn: db.DbConnection) -> Role: @@ -62,6 +63,5 @@ def create_verified_user( name: str, password: str ) -> User: - """Create a verified user.""" - _vars = (conn, email, name, password) - return DUMMY_USER + """Create a pre-verified credentialed user with no roles.""" + return create_credentialed_user(conn, email, name, password, verified=True) -- cgit 1.4.1