stages/user_write: fix migration setting wrong value, fix form

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer 2023-01-23 14:04:42 +01:00
parent 894873b373
commit b99afd82b2
No known key found for this signature in database
3 changed files with 7 additions and 3 deletions

View File

@ -11,9 +11,9 @@ def migrate_to_user_creation_mode(apps: Apps, schema_editor: BaseDatabaseSchemaE
for stage in UserWriteStage.objects.using(schema_editor.connection.alias).all():
if stage.can_create_users:
stage.user_creation_mode = UserCreationMode.NEVER_CREATE
else:
stage.user_creation_mode = UserCreationMode.CREATE_WHEN_REQUIRED
else:
stage.user_creation_mode = UserCreationMode.NEVER_CREATE
stage.save()

View File

@ -61,7 +61,7 @@ export class UserWriteStageForm extends ModelForm<UserWriteStage, string> {
<ak-form-group .expanded=${true}>
<span slot="header"> ${t`Stage-specific settings`} </span>
<div slot="body" class="pf-c-form">
<ak-form-element-horizontal name="canCreateUsers">
<ak-form-element-horizontal name="userCreationMode">
<ak-radio
.options=${[
{

View File

@ -115,6 +115,10 @@ image:
- web/elements: fix SearchSelect not working on safari
- web/flows: fix flow executor background overlay in safari
## Fixed in 2023.1.2
- stages/user_write: fix migration setting wrong value, fix form
## API Changes
#### What's Deleted