registration: Password should be required in form.

Password field should be optional only when password auth backend is not
enabled or when password is not required as in Google or GitHub
registration.
This commit is contained in:
Umair Khan 2017-08-07 13:12:37 +05:00 committed by Tim Abbott
parent bb0eb76bf3
commit 5d0ac49f12
1 changed files with 1 additions and 2 deletions

View File

@ -55,8 +55,7 @@ class RegistrationForm(forms.Form):
full_name = forms.CharField(max_length=UserProfile.MAX_NAME_LENGTH)
# The required-ness of the password field gets overridden if it isn't
# actually required for a realm
password = forms.CharField(widget=forms.PasswordInput, max_length=MAX_PASSWORD_LENGTH,
required=False)
password = forms.CharField(widget=forms.PasswordInput, max_length=MAX_PASSWORD_LENGTH)
realm_subdomain = forms.CharField(max_length=Realm.MAX_REALM_SUBDOMAIN_LENGTH, required=False)
def __init__(self, *args, **kwargs):