Ticket #8182: 8182_with_docs.diff

File 8182_with_docs.diff, 2.4 KB (added by benjixx, 7 years ago)
  • django/core/context_processors.py

     
    7979
    8080    def __getitem__(self, module_name):
    8181        return PermLookupDict(self.user, module_name)
     82   
     83    def __iter__(self):
     84        for perm in self.user.get_all_permissions():
     85            yield perm
     86
  • django/contrib/auth/models.py

     
    372372
    373373    def is_authenticated(self):
    374374        return False
     375
     376    def get_full_name(self):
     377        raise NotImplementedError
     378
     379    def set_unusable_password(self):
     380        raise NotImplementedError
     381
     382    def has_usable_password(self):
     383        raise NotImplementedError
     384
     385    def get_group_permissions(self):
     386        return set()
     387
     388    def get_all_permissions(self):
     389        return set()
     390
     391    def email_user(self, subject, message, from_email=None):
     392        raise NotImplementedError
     393
     394    def get_profile(self):
     395        raise NotImplementedError
     396
  • docs/authentication.txt

     
    252252    * ``groups`` and ``user_permissions`` are always empty.
    253253    * ``is_anonymous()`` returns ``True`` instead of ``False``.
    254254    * ``is_authenticated()`` returns ``False`` instead of ``True``.
    255     * ``has_perm()`` always returns ``False``.
    256     * ``set_password()``, ``check_password()``, ``save()``, ``delete()``,
    257       ``set_groups()`` and ``set_permissions()`` raise ``NotImplementedError``.
     255    * ``has_perm()``, ``has_perms()`` and ``has_module_perms()`` always
     256      returns ``False``.
     257    * ``get_all_permissions()`` and ``get_group_permissions`` always returns
     258      empty set.
     259    * ``get_full_name()``, ``get_profile()``, ``email_user()``,
     260      ``set_password()``, ``check_password()``, ``set_unusable_password()``,
     261      ``has_usable_password()``, ``save()``, ``delete()``, ``set_groups()``
     262      and ``set_permissions()`` raise ``NotImplementedError``.
    258263
    259264In practice, you probably won't need to use ``AnonymousUser`` objects on your
    260265own, but they're used by Web requests, as explained in the next section.
Back to Top