Opened 13 years ago
Closed 13 years ago
#16813 closed Bug (fixed)
changeset 16789 removed supports_inactive_user checks to early, should happen in 1.5
Reported by: | Florian Apolloner | Owned by: | Dan Poirier |
---|---|---|---|
Component: | contrib.auth | Version: | dev |
Severity: | Release blocker | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The title says it all. According to the deprecation policy backends need to define supports_inactive_user in django 1.4 and it is supposed to get checked too -- Some code in r16789 already assumes that backends have to support inactive users.
As a small sidenote: the if obj is not None codepaths in the has_perm* checks can get removed, backends are supposed to deal with that in 1.4
Change History (7)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Ok, apparently this was broken before this commit already; the code now always passes the checks onto the backend and ignores the supports_inactive_user flag completely -- since no tests broke it looks like we need to add proper tests for this too.
comment:5 by , 13 years ago
Owner: | changed from | to
---|
comment:6 by , 13 years ago
Has patch: | set |
---|
Added back the checking whether an auth backend supports_inactive_user before calling it for non-anonymous, inactive users.
Fixed test that was expecting the test backend that does not support inactive users to grant perms to an inactive user.
Proposed fix is pull request at https://github.com/django/django/pull/72
comment:7 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
In [17084]:
(The changeset message doesn't reference this ticket)
Each one of those changes was done by turning supports_anonymous_user in True, and propogating it through. If there's a bug, I think it was already there (no failing tests).