Code

Ticket #12113: 12113.diff

File 12113.diff, 1.4 KB (added by timo, 4 years ago)

minor edits to existing patch

Line 
1Index: docs/topics/auth.txt
2===================================================================
3--- docs/topics/auth.txt        (revision 11793)
4+++ docs/topics/auth.txt        (working copy)
5@@ -99,9 +99,12 @@
6         This doesn't control whether or not the user can log in. Nothing in the
7         authentication path checks the ``is_active`` flag, so if you want to
8         reject a login based on ``is_active`` being ``False``, it is up to you
9-        to check that in your own login view. However, permission checking
10-        using the methods like :meth:`~models.User.has_perm` does check this
11-        flag and will always return ``False`` for inactive users.
12+        to check that in your own login view. The
13+        :class:`~django.contrib.auth.forms.AuthenticationForm` used by the
14+        by the :func:`~django.contrib.auth.views.login` view *does* perform this
15+        check and therefore rejects inactive users from logging in. Permission
16+        checking using the methods like :meth:`~models.User.has_perm` also
17+        checks this flag and will always return ``False`` for inactive users.
18 
19     .. attribute:: models.User.is_superuser
20 
21@@ -970,6 +973,9 @@
22 
23     A form for logging a user in.
24 
25+    The ``AuthenticationForm`` rejects users whose
26+    :attr:`~django.contrib.auth.models.User.is_active` flag is set to ``False``.
27+
28 .. class:: PasswordChangeForm
29 
30     A form for allowing a user to change their password.