authenticate user after their reset confirmation goes through
make password validation code more DRY grammar nit: "less" -> "fewer"
This commit is contained in:
@@ -19,11 +19,7 @@ from django.template import loader
|
||||
from django.conf import settings
|
||||
from microsite_configuration import microsite
|
||||
from student.models import CourseEnrollmentAllowed
|
||||
from util.password_policy_validators import (
|
||||
validate_password_length,
|
||||
validate_password_complexity,
|
||||
validate_password_dictionary,
|
||||
)
|
||||
from util.password_policy_validators import validate_password_strength
|
||||
from openedx.core.djangoapps.theming import helpers as theming_helpers
|
||||
|
||||
|
||||
@@ -223,9 +219,7 @@ class AccountCreationForm(forms.Form):
|
||||
raise ValidationError(_("Username and password fields cannot match"))
|
||||
if self.enforce_password_policy:
|
||||
try:
|
||||
validate_password_length(password)
|
||||
validate_password_complexity(password)
|
||||
validate_password_dictionary(password)
|
||||
validate_password_strength(password)
|
||||
except ValidationError, err:
|
||||
raise ValidationError(_("Password: ") + "; ".join(err.messages))
|
||||
return password
|
||||
|
||||
Reference in New Issue
Block a user