providers/oauth2: fix redirect_uris not having blank set

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-07-21 00:22:09 +02:00
parent 2352a7f4d6
commit 902378af53
3 changed files with 3 additions and 2 deletions

View File

@ -109,6 +109,7 @@ class Migration(migrations.Migration):
"redirect_uris", "redirect_uris",
models.TextField( models.TextField(
default="", default="",
blank=True,
help_text="Enter each URI on a new line.", help_text="Enter each URI on a new line.",
verbose_name="Redirect URIs", verbose_name="Redirect URIs",
), ),

View File

@ -158,6 +158,7 @@ class OAuth2Provider(Provider):
) )
redirect_uris = models.TextField( redirect_uris = models.TextField(
default="", default="",
blank=True,
verbose_name=_("Redirect URIs"), verbose_name=_("Redirect URIs"),
help_text=_("Enter each URI on a new line."), help_text=_("Enter each URI on a new line."),
) )

View File

@ -111,9 +111,8 @@ export class OAuth2ProviderFormPage extends ModelForm<OAuth2Provider, number> {
</ak-form-element-horizontal> </ak-form-element-horizontal>
<ak-form-element-horizontal <ak-form-element-horizontal
label=${t`Redirect URIs/Origins`} label=${t`Redirect URIs/Origins`}
?required=${true}
name="redirectUris"> name="redirectUris">
<textarea class="pf-c-form-control" required>${this.instance?.redirectUris}</textarea> <textarea class="pf-c-form-control">${this.instance?.redirectUris}</textarea>
<p class="pf-c-form__helper-text"> <p class="pf-c-form__helper-text">
${t`Valid redirect URLs after a successful authorization flow. Also specify any origins here for Implicit flows.`} ${t`Valid redirect URLs after a successful authorization flow. Also specify any origins here for Implicit flows.`}
</p> </p>