Django

Code

Changeset 6912

Show
Ignore:
Timestamp:
12/11/07 00:37:07 (9 months ago)
Author:
gwilson
Message:

Fixed #6174 -- Made AnonymousUser.is_active False instead of True since AnonymousUsers can't login. Thanks, SmileyChris.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/contrib/auth/models.py

    r6375 r6912  
    323323    username = '' 
    324324    is_staff = False 
    325     is_active = Tru
     325    is_active = Fals
    326326    is_superuser = False 
    327327    _groups = EmptyManager() 
  • django/trunk/django/contrib/auth/tests.py

    r6299 r6912  
    1717>>> u2.has_usable_password() 
    1818False 
     19 
     20>>> u.is_authenticated() 
     21True 
     22>>> u.is_staff 
     23False 
     24>>> u.is_active 
     25True 
     26 
    1927>>> a = AnonymousUser() 
     28>>> a.is_authenticated() 
     29False 
    2030>>> a.is_staff 
     31False 
     32>>> a.is_active 
    2133False 
    2234>>> a.groups.all()