Opened 9 years ago

Closed 8 years ago

#7304 closed (fixed)

AnonymousUser doesn't have has_perms()

Reported by: thierry@… Owned by: Matthias Kestenholz
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 Morales)

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 Matthias Kestenholz 8 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 9 years ago by Matthias Kestenholz

Has patch: set
Triage Stage: UnreviewedAccepted

comment:2 Changed 8 years ago by Ramiro Morales

Description: modified (diff)

Changed 8 years ago by Matthias Kestenholz

Attachment: 7304.patch added

comment:3 Changed 8 years ago by Matthias Kestenholz

Owner: changed from nobody to Matthias Kestenholz
Status: newassigned
Triage Stage: AcceptedReady for checkin

Includes tests now.

comment:4 Changed 8 years ago by Adrian Holovaty

Resolution: fixed
Status: assignedclosed

(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