Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
9a63d840
Kaydet (Commit)
9a63d840
authored
Kas 03, 2018
tarafından
Tobias Bengfort
Kaydeden (comit)
Tim Graham
Kas 03, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed inconsistent indentation in docs/ref/contrib/auth.txt.
üst
d207ac15
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
29 deletions
+30
-29
auth.txt
docs/ref/contrib/auth.txt
+30
-29
No files found.
docs/ref/contrib/auth.txt
Dosyayı görüntüle @
9a63d840
...
@@ -549,7 +549,7 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
...
@@ -549,7 +549,7 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
Returns whether the ``user_obj`` has any permissions on the app
Returns whether the ``user_obj`` has any permissions on the app
``app_label``.
``app_label``.
.. method::
ModelBackend.
user_can_authenticate()
.. method:: user_can_authenticate()
Returns whether the user is allowed to authenticate. To match the
Returns whether the user is allowed to authenticate. To match the
behavior of :class:`~django.contrib.auth.forms.AuthenticationForm`
behavior of :class:`~django.contrib.auth.forms.AuthenticationForm`
...
@@ -582,45 +582,46 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
...
@@ -582,45 +582,46 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
If you need more control, you can create your own authentication backend
If you need more control, you can create your own authentication backend
that inherits from this class and override these attributes or methods:
that inherits from this class and override these attributes or methods:
.. attribute:: RemoteUserBackend.
create_unknown_user
.. attribute::
create_unknown_user
``True`` or ``False``. Determines whether or not a user object is created
``True`` or ``False``. Determines whether or not a user object is
if not already in the database Defaults to ``True``.
created
if not already in the database Defaults to ``True``.
.. method:: RemoteUserBackend.
authenticate(request, remote_user)
.. method::
authenticate(request, remote_user)
The username passed as ``remote_user`` is considered trusted. This method
The username passed as ``remote_user`` is considered trusted. This
simply returns the user object with the given username, creating a new
method simply returns the user object with the given username, creating
user object if :attr:`~RemoteUserBackend.create_unknown_user` is ``True``.
a new user object if :attr:`~RemoteUserBackend.create_unknown_user` is
``True``.
Returns ``None`` if :attr:`~RemoteUserBackend.create_unknown_user` is
Returns ``None`` if :attr:`~RemoteUserBackend.create_unknown_user` is
``False`` and a ``User`` object with the given username is not found in the
``False`` and a ``User`` object with the given username is not found in
database.
the
database.
``request`` is an :class:`~django.http.HttpRequest` and may be ``None`` if
``request`` is an :class:`~django.http.HttpRequest` and may be ``None``
it wasn't provided to :func:`~django.contrib.auth.authenticate` (which
if it wasn't provided to :func:`~django.contrib.auth.authenticate`
passes it on to the backend).
(which
passes it on to the backend).
.. method:: RemoteUserBackend.
clean_username(username)
.. method::
clean_username(username)
Performs any cleaning on the ``username`` (e.g. stripping LDAP DN
Performs any cleaning on the ``username`` (e.g. stripping LDAP DN
information) prior to using it to get or create a user object. Returns the
information) prior to using it to get or create a user object. Returns
cleaned username.
the
cleaned username.
.. method:: RemoteUserBackend.
configure_user(user)
.. method::
configure_user(user)
Configures a newly created user. This method is called immediately after a
Configures a newly created user. This method is called immediately
new user is created, and can be used to perform custom setup actions, such
after a new user is created, and can be used to perform custom setup
as setting the user's groups based on attributes in an LDAP directory.
actions, such as setting the user's groups based on attributes in an
Returns the user object.
LDAP directory.
Returns the user object.
.. method:: RemoteUserBackend.
user_can_authenticate()
.. method::
user_can_authenticate()
Returns whether the user is allowed to authenticate. This method returns
Returns whether the user is allowed to authenticate. This method
``False`` for users with :attr:`is_active=False
returns
``False`` for users with :attr:`is_active=False
<django.contrib.auth.models.User.is_active>`. Custom user models that don'
t
<django.contrib.auth.models.User.is_active>`. Custom user models tha
t
have an :attr:`~django.contrib.auth.models.CustomUser.is_active` field are
don't have an :attr:`~django.contrib.auth.models.CustomUser.is_active`
allowed.
field are
allowed.
.. class:: AllowAllUsersRemoteUserBackend
.. class:: AllowAllUsersRemoteUserBackend
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment