Added 'New in Django development version' to changes in docs/authentication.txt from [5771]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5774 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
fd2b99b5f1
commit
d76e532077
|
@ -99,7 +99,7 @@ custom methods:
|
||||||
should prefer using ``is_authenticated()`` to this method.
|
should prefer using ``is_authenticated()`` to this method.
|
||||||
|
|
||||||
* ``is_authenticated()`` -- Always returns ``True``. This is a way to
|
* ``is_authenticated()`` -- Always returns ``True``. This is a way to
|
||||||
tell if the user has been authenticated. This does not imply any
|
tell if the user has been authenticated. This does not imply any
|
||||||
permissions, and doesn't check if the user is active - it only indicates
|
permissions, and doesn't check if the user is active - it only indicates
|
||||||
that the user has provided a valid username and password.
|
that the user has provided a valid username and password.
|
||||||
|
|
||||||
|
@ -114,16 +114,17 @@ custom methods:
|
||||||
string is the correct password for the user. (This takes care of the
|
string is the correct password for the user. (This takes care of the
|
||||||
password hashing in making the comparison.)
|
password hashing in making the comparison.)
|
||||||
|
|
||||||
* ``set_unusable_password()`` -- Marks the user as having no password set.
|
* ``set_unusable_password()`` -- **New in Django development version.**
|
||||||
This isn't the same as having a blank string for a password.
|
Marks the user as having no password set. This isn't the same as having
|
||||||
``check_password()`` for this user will never return ``True``. Doesn't
|
a blank string for a password. ``check_password()`` for this user will
|
||||||
save the ``User`` object.
|
never return ``True``. Doesn't save the ``User`` object.
|
||||||
|
|
||||||
You may need this if authentication for your application takes place
|
You may need this if authentication for your application takes place
|
||||||
against an existing external source such as an LDAP directory.
|
against an existing external source such as an LDAP directory.
|
||||||
|
|
||||||
* ``has_usable_password()`` -- Returns ``False`` if
|
* ``has_usable_password()`` -- **New in Django development version.**
|
||||||
``set_unusable_password()`` has been called for this user.
|
Returns ``False`` if ``set_unusable_password()`` has been called for this
|
||||||
|
user.
|
||||||
|
|
||||||
* ``get_group_permissions()`` -- Returns a list of permission strings that
|
* ``get_group_permissions()`` -- Returns a list of permission strings that
|
||||||
the user has, through his/her groups.
|
the user has, through his/her groups.
|
||||||
|
@ -137,7 +138,7 @@ custom methods:
|
||||||
|
|
||||||
* ``has_perms(perm_list)`` -- Returns ``True`` if the user has each of the
|
* ``has_perms(perm_list)`` -- Returns ``True`` if the user has each of the
|
||||||
specified permissions, where each perm is in the format
|
specified permissions, where each perm is in the format
|
||||||
``"package.codename"``. If the user is inactive, this method will
|
``"package.codename"``. If the user is inactive, this method will
|
||||||
always return ``False``.
|
always return ``False``.
|
||||||
|
|
||||||
* ``has_module_perms(package_name)`` -- Returns ``True`` if the user has
|
* ``has_module_perms(package_name)`` -- Returns ``True`` if the user has
|
||||||
|
@ -163,10 +164,10 @@ Manager functions
|
||||||
|
|
||||||
The ``User`` model has a custom manager that has the following helper functions:
|
The ``User`` model has a custom manager that has the following helper functions:
|
||||||
|
|
||||||
* ``create_user(username, email, password=None)`` -- Creates, saves and
|
* ``create_user(username, email, password=None)`` -- Creates, saves and
|
||||||
returns a ``User``. The ``username``, ``email`` and ``password`` are set
|
returns a ``User``. The ``username``, ``email`` and ``password`` are set
|
||||||
as given, and the ``User`` gets ``is_active=True``.
|
as given, and the ``User`` gets ``is_active=True``.
|
||||||
|
|
||||||
If no password is provided, ``set_unusable_password()`` will be called.
|
If no password is provided, ``set_unusable_password()`` will be called.
|
||||||
|
|
||||||
See _`Creating users` for example usage.
|
See _`Creating users` for example usage.
|
||||||
|
|
Loading…
Reference in New Issue