Ticket #15676: 15676.patch

File 15676.patch, 668 bytes (added by Rohan Jain, 14 years ago)
  • django/contrib/auth/models.py

    diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py
    index 8fcbdef..97d9c99 100644
    a b class User(models.Model):  
    329329        If object is passed, it checks if the user has all required perms
    330330        for this object.
    331331        """
     332       
     333        # Active superusers have all permissions.
     334        if self.is_active and self.is_superuser:
     335            return True
     336       
    332337        for perm in perm_list:
    333             if not self.has_perm(perm, obj):
     338            if not _user_has_perm(self, perm, obj):
    334339                return False
    335340        return True
    336341
Back to Top