Changeset 7414
- Timestamp:
- 04/12/08 20:50:29 (3 months ago)
- Files:
-
- django/trunk/django/contrib/auth/models.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/contrib/auth/models.py
r6912 r7414 135 135 password = models.CharField(_('password'), max_length=128, help_text=_("Use '[algo]$[salt]$[hexdigest]' or use the <a href=\"password/\">change password form</a>.")) 136 136 is_staff = models.BooleanField(_('staff status'), default=False, help_text=_("Designates whether the user can log into this admin site.")) 137 is_active = models.BooleanField(_('active'), default=True, help_text=_("Designates whether this user can log into the Django admin. Unselect this instead of deleting accounts."))137 is_active = models.BooleanField(_('active'), default=True, help_text=_("Designates whether this user should be treated as active. Unselect this instead of deleting accounts.")) 138 138 is_superuser = models.BooleanField(_('superuser status'), default=False, help_text=_("Designates that this user has all permissions without explicitly assigning them.")) 139 139 last_login = models.DateTimeField(_('last login'), default=datetime.datetime.now) … … 227 227 if hasattr(backend, "get_all_permissions"): 228 228 permissions.update(backend.get_all_permissions(self)) 229 return permissions 229 return permissions 230 230 231 231 def has_perm(self, perm): … … 239 239 if not self.is_active: 240 240 return False 241 241 242 242 # Superusers have all permissions. 243 243 if self.is_superuser: 244 244 return True 245 245 246 246 # Otherwise we need to check the backends. 247 247 for backend in auth.get_backends():
