providers/oauth2: set related_name for many-to-many so used by detects the connection

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-05-24 21:57:03 +02:00
parent d4ef321ac2
commit 4a9b788703
2 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@ class Migration(migrations.Migration):
field=models.ManyToManyField( field=models.ManyToManyField(
blank=True, blank=True,
default=None, default=None,
related_name="+", related_name="oauth2_providers",
to="authentik_sources_oauth.oauthsource", to="authentik_sources_oauth.oauthsource",
verbose_name="Any JWT signed by the JWK of the selected source can be used to authenticate.", verbose_name="Any JWT signed by the JWK of the selected source can be used to authenticate.",
), ),
@ -33,7 +33,7 @@ class Migration(migrations.Migration):
blank=True, blank=True,
default=None, default=None,
help_text="DEPRECATED. JWTs created with the configured certificates can authenticate with this provider.", help_text="DEPRECATED. JWTs created with the configured certificates can authenticate with this provider.",
related_name="+", related_name="oauth2_providers",
to="authentik_crypto.certificatekeypair", to="authentik_crypto.certificatekeypair",
verbose_name="Allowed certificates for JWT-based client_credentials", verbose_name="Allowed certificates for JWT-based client_credentials",
), ),

View File

@ -231,7 +231,7 @@ class OAuth2Provider(Provider):
"certificates can authenticate with this provider." "certificates can authenticate with this provider."
) )
), ),
related_name="+", related_name="oauth2_providers",
default=None, default=None,
blank=True, blank=True,
) )
@ -240,7 +240,7 @@ class OAuth2Provider(Provider):
verbose_name=_( verbose_name=_(
"Any JWT signed by the JWK of the selected source can be used to authenticate." "Any JWT signed by the JWK of the selected source can be used to authenticate."
), ),
related_name="+", related_name="oauth2_providers",
default=None, default=None,
blank=True, blank=True,
) )