Opened 4 years ago

Closed 4 years ago

#16813 closed Bug (fixed)

changeset 16789 removed supports_inactive_user checks to early, should happen in 1.5

Reported by: apollo13 Owned by: 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 4 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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 4 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 4 years ago by jezdez

  • Triage Stage changed from Unreviewed to Accepted

Seems broken.. :(

comment:4 Changed 4 years ago by jacob

  • milestone 1.4 deleted

Milestone 1.4 deleted

comment:5 Changed 4 years ago by poirier

  • Owner changed from nobody to poirier

comment:6 Changed 4 years ago by 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 4 years ago by kmtracey

  • Resolution set to fixed
  • Status changed from new to closed

In [17084]:

(The changeset message doesn't reference this ticket)

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