The proposal is to change the `login` function signature to:
`login(request, user, backend=None)`
The following rules will apply:
1. Use the value of the `backend` argument, if provided.
2. Use the value of the `user.backend` annotation, if present.
3. Use the only configured backend, if there is only one.
4. Raise ValueError("You have multiple authentication backends configured;
you must provide the backend argument to login.") otherwise.
More information can be found in the mailing list topic:
https://groups.google.com/forum/#!topic/django-developers/_I0BW5L7Z58
--
Ticket URL: <https://code.djangoproject.com/ticket/24855>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => assigned
* needs_docs: => 0
* owner: nobody => poiati
* needs_tests: => 0
* needs_better_patch: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/24855#comment:1>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/24855#comment:2>
Comment (by poiati):
Patch: https://github.com/django/django/pull/5370
--
Ticket URL: <https://code.djangoproject.com/ticket/24855#comment:3>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/24855#comment:4>
* needs_docs: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/24855#comment:5>
Comment (by poiati):
Replying to [comment:5 carljm]:
The documentation was updated .
--
Ticket URL: <https://code.djangoproject.com/ticket/24855#comment:6>
* needs_docs: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/24855#comment:7>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/24855#comment:8>
* needs_better_patch: 1 => 0
Comment:
I applied the corrections in the PR.
--
Ticket URL: <https://code.djangoproject.com/ticket/24855#comment:9>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"b6433866682baac35a953e59298dff7f399ac49b" b643386]:
{{{
#!CommitTicketReference repository=""
revision="b6433866682baac35a953e59298dff7f399ac49b"
Fixed #24855 -- Allowed using contrib.auth.login() without credentials.
Added an optional `backend` argument to login().
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24855#comment:10>
Comment (by Tim Graham <timograham@…>):
In [changeset:"6ea7b6776c79b7a30b32c4f0c1f2658bc49dfe6c" 6ea7b67]:
{{{
#!CommitTicketReference repository=""
revision="6ea7b6776c79b7a30b32c4f0c1f2658bc49dfe6c"
Refs #24855 -- fixed typo in 1.10 release notes
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24855#comment:11>