Django

Code

Ticket #7304 (closed: fixed)

Opened 3 months ago

Last modified 1 month ago

AnonymousUser doesn't have has_perms()

Reported by: thierry@droneship.com Assigned to: mk
Milestone: Component: Core framework
Version: SVN Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

7304.patch (1.3 kB) - added by mk on 07/21/08 08:20:31.

Change History

06/03/08 06:58:27 changed by mk

  • needs_better_patch changed.
  • has_patch set to 1.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • needs_docs changed.

06/16/08 10:54:57 changed by ramiro

  • description changed.

07/21/08 08:20:31 changed by mk

  • attachment 7304.patch added.

07/21/08 08:21:19 changed by mk

  • owner changed from nobody to mk.
  • status changed from new to assigned.
  • stage changed from Accepted to Ready for checkin.

Includes tests now.

07/21/08 22:05:42 changed by adrian

  • status changed from assigned to closed.
  • resolution set to fixed.

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


Add/Change #7304 (AnonymousUser doesn't have has_perms())




Change Properties
Action