Opened 12 years ago

Closed 12 years ago

#2622 closed defect (fixed)

[patch] [per-object-permissions] has_perm breaks with anonymous users if an object is passed

Reported by: django25@… Owned by: Chris Long
Component: Contrib apps Version: master
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Index: django/contrib/auth/
--- django/contrib/auth/       (revision 3680)
+++ django/contrib/auth/       (working copy)
@@ -542,7 +542,7 @@
         raise NotImplementedError
     user_permissions = property(_get_user_permissions)

-    def has_perm(self, perm):
+    def has_perm(self, perm, object=None):
         return False

     def has_module_perms(self, module):

Seems reasonable to me. Stops it complaining anyway :-)

Change History (1)

comment:1 Changed 12 years ago by Chris Long

Resolution: fixed
Status: newclosed

(In [3682]) [per-object-permissions] Fixed #2622 and added in contains_permission method to the anonymous user model

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