From c62794c738d92d4d2456a30b9b4d8db4bdbe0a6f Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 24 May 2020 16:58:01 +0200 Subject: [PATCH 1/2] admin: fix PropertyMapping widget not rendering properly --- passbook/core/migrations/0002_default_user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/passbook/core/migrations/0002_default_user.py b/passbook/core/migrations/0002_default_user.py index 82a8d6d35..1dd6ecdd0 100644 --- a/passbook/core/migrations/0002_default_user.py +++ b/passbook/core/migrations/0002_default_user.py @@ -10,7 +10,7 @@ def create_default_user(apps: Apps, schema_editor: BaseDatabaseSchemaEditor): from passbook.core.models import User pbadmin = User.objects.create( - username="pbadmin", email="root@localhost", # password="pbadmin" + username="pbadmin", email="root@localhost", name="passbook Default Admin" ) pbadmin.set_password("pbadmin") # nosec pbadmin.is_superuser = True From f91e02a0ec791b2d12ea14985441494f3b827020 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Fri, 5 Jun 2020 20:30:47 +0200 Subject: [PATCH 2/2] flows: allow username for default flow --- passbook/flows/migrations/0002_default_flows.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/passbook/flows/migrations/0002_default_flows.py b/passbook/flows/migrations/0002_default_flows.py index 21d61d338..5977cc8ee 100644 --- a/passbook/flows/migrations/0002_default_flows.py +++ b/passbook/flows/migrations/0002_default_flows.py @@ -31,7 +31,7 @@ def create_default_authentication_flow( if not IdentificationStage.objects.using(db_alias).exists(): IdentificationStage.objects.using(db_alias).create( name="identification", - user_fields=[UserFields.E_MAIL], + user_fields=[UserFields.E_MAIL, UserFields.USERNAME], template=Templates.DEFAULT_LOGIN, ) @@ -44,7 +44,7 @@ def create_default_authentication_flow( UserLoginStage.objects.using(db_alias).create(name="authentication") flow = Flow.objects.using(db_alias).create( - name="default-authentication-flow", + name="Welcome to passbook!", slug="default-authentication-flow", designation=FlowDesignation.AUTHENTICATION, )