From d76e5320772686dfc120fe0e32cc816504bf7fb5 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sun, 29 Jul 2007 18:21:16 +0000 Subject: [PATCH] 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 --- docs/authentication.txt | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/docs/authentication.txt b/docs/authentication.txt index 637921af84..a05624db68 100644 --- a/docs/authentication.txt +++ b/docs/authentication.txt @@ -99,7 +99,7 @@ custom methods: should prefer using ``is_authenticated()`` to this method. * ``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 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 password hashing in making the comparison.) - * ``set_unusable_password()`` -- Marks the user as having no password set. - This isn't the same as having a blank string for a password. - ``check_password()`` for this user will never return ``True``. Doesn't - save the ``User`` object. - - You may need this if authentication for your application takes place + * ``set_unusable_password()`` -- **New in Django development version.** + Marks the user as having no password set. This isn't the same as having + a blank string for a password. ``check_password()`` for this user will + never return ``True``. Doesn't save the ``User`` object. + + You may need this if authentication for your application takes place against an existing external source such as an LDAP directory. - * ``has_usable_password()`` -- Returns ``False`` if - ``set_unusable_password()`` has been called for this user. + * ``has_usable_password()`` -- **New in Django development version.** + Returns ``False`` if ``set_unusable_password()`` has been called for this + user. * ``get_group_permissions()`` -- Returns a list of permission strings that 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 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``. * ``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: - * ``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 as given, and the ``User`` gets ``is_active=True``. - + If no password is provided, ``set_unusable_password()`` will be called. See _`Creating users` for example usage.