diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py index 5af223fa6d..72fda34f9c 100644 --- a/django/contrib/auth/models.py +++ b/django/contrib/auth/models.py @@ -156,7 +156,7 @@ class User(models.Model): def get_all_permissions(self): if not hasattr(self, '_perm_cache'): import sets - self._perm_cache = sets.Set(["%s.%s" % (p.package_id, p.codename) for p in self.get_permission_list()]) + self._perm_cache = sets.Set(["%s.%s" % (p.package_id, p.codename) for p in self.user_permissions.all()]) self._perm_cache.update(self.get_group_permissions()) return self._perm_cache