*: Adjust forms to only show respective types of Flows and PropertyMappings

This commit is contained in:
Jens Langhammer
2020-08-01 20:00:20 +02:00
parent fcf70a3cd4
commit d4a5269bf1
6 changed files with 41 additions and 28 deletions

View File

@ -1,6 +1,7 @@
"""passbook OIDC IDP Forms"""
from django import forms
from django.utils.translation import gettext as _
from oauth2_provider.generators import generate_client_id, generate_client_secret
from oidc_provider.models import Client
@ -12,7 +13,8 @@ class OIDCProviderForm(forms.ModelForm):
"""OpenID Client form"""
authorization_flow = forms.ModelChoiceField(
queryset=Flow.objects.filter(designation=FlowDesignation.AUTHORIZATION)
queryset=Flow.objects.filter(designation=FlowDesignation.AUTHORIZATION),
help_text=_("Flow used when authorizing this provider."),
)
def __init__(self, *args, **kwargs):