Merge branch 'master' into docs-flows
This commit is contained in:
commit
07da5f7122
|
@ -10,7 +10,7 @@ def create_default_user(apps: Apps, schema_editor: BaseDatabaseSchemaEditor):
|
||||||
from passbook.core.models import User
|
from passbook.core.models import User
|
||||||
|
|
||||||
pbadmin = User.objects.create(
|
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.set_password("pbadmin") # nosec
|
||||||
pbadmin.is_superuser = True
|
pbadmin.is_superuser = True
|
||||||
|
|
|
@ -31,7 +31,7 @@ def create_default_authentication_flow(
|
||||||
if not IdentificationStage.objects.using(db_alias).exists():
|
if not IdentificationStage.objects.using(db_alias).exists():
|
||||||
IdentificationStage.objects.using(db_alias).create(
|
IdentificationStage.objects.using(db_alias).create(
|
||||||
name="identification",
|
name="identification",
|
||||||
user_fields=[UserFields.E_MAIL],
|
user_fields=[UserFields.E_MAIL, UserFields.USERNAME],
|
||||||
template=Templates.DEFAULT_LOGIN,
|
template=Templates.DEFAULT_LOGIN,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ def create_default_authentication_flow(
|
||||||
UserLoginStage.objects.using(db_alias).create(name="authentication")
|
UserLoginStage.objects.using(db_alias).create(name="authentication")
|
||||||
|
|
||||||
flow = Flow.objects.using(db_alias).create(
|
flow = Flow.objects.using(db_alias).create(
|
||||||
name="default-authentication-flow",
|
name="Welcome to passbook!",
|
||||||
slug="default-authentication-flow",
|
slug="default-authentication-flow",
|
||||||
designation=FlowDesignation.AUTHENTICATION,
|
designation=FlowDesignation.AUTHENTICATION,
|
||||||
)
|
)
|
||||||
|
|
Reference in New Issue