Opened 7 years ago

Closed 7 years ago

#7304 closed (fixed)

AnonymousUser doesn't have has_perms()

Reported by: thierry@… Owned by: mk
Component: Core (Other) Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by ramiro)

Trying to call has_perms() on the AnonymousUser results in the following error:

   'AnonymousUser' object has no attribute 'has_perms'

has_perm() works as expected

The problem with this is that one cannot use has_perms() without first checking for the AnonymousUser.

Attachments (1)

7304.patch (1.3 KB) - added by mk 7 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 7 years ago by mk

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 7 years ago by ramiro

  • Description modified (diff)

Changed 7 years ago by mk

comment:3 Changed 7 years ago by mk

  • Owner changed from nobody to mk
  • Status changed from new to assigned
  • Triage Stage changed from Accepted to Ready for checkin

Includes tests now.

comment:4 Changed 7 years ago by adrian

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

(In [8044]) Fixed #7304 -- Gave AnonymousUser a has_perms() method, which it was lacking

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