﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
12103	Add AuthenticationForm.confirm_login_allowed to allow customizing the login policy	Ethan Jucovy	nobody	"I've built a site that uses django-registration to manage user account creation. I allow inactive users to log in, with minimal functionality: I use middleware to kick them to a page that reminds them to confirm their account.

To do this, I copied the whole `AuthenticationForm.clean()` method from `django.contrib.auth.forms` to my custom authentication_form, and removed two lines:
{{{
  elif not self.user_cache.is_active:
    raise forms.ValidationError(_(""This account is inactive.""))
}}}

From my code's perspective, it would be nicer if the base `AuthenticationForm` had a class-level setting to toggle whether this check happens. Then all I would have to do is subclass the form with an override, like
{{{
class MyAuthenticationForm(AuthenticationForm):
  allow_inactive_logins = True
}}}"	New feature	closed	contrib.auth	dev	Normal	fixed		ethan.jucovy@… bmheight@…	Accepted	1	0	0	0	0	0
