Opened 8 years ago

Closed 8 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: master
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


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 Changed 8 years ago by Alex Gaynor

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).

comment:2 Changed 8 years ago by anonymous

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:3 Changed 8 years ago by Jannis Leidel

Triage Stage: UnreviewedAccepted

Seems broken.. :(

comment:4 Changed 8 years ago by Jacob

milestone: 1.4

Milestone 1.4 deleted

comment:5 Changed 8 years ago by Dan Poirier

Owner: changed from nobody to Dan Poirier

comment:6 Changed 8 years ago by Dan Poirier

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

comment:7 Changed 8 years ago by Karen Tracey

Resolution: fixed
Status: newclosed

In [17084]:

(The changeset message doesn't reference this ticket)

Note: See TracTickets for help on using tickets.
Back to Top