summaryrefslogtreecommitdiff
path: root/django/contrib/auth/models.py
diff options
context:
space:
mode:
authorRobin Munn <robin.munn@gmail.com>2006-10-24 07:49:37 +0000
committerRobin Munn <robin.munn@gmail.com>2006-10-24 07:49:37 +0000
commit0b059aa4eadc1d95ceca3a32821b65a9fb2a53e8 (patch)
tree76f84c62e3ac5cd5172d43dd73a651bb8574e2d1 /django/contrib/auth/models.py
parent1bb4fa2cb66269b1eff3b7d73f8c7864c0622368 (diff)
sqlalchemy: Merged revisions 3832 to 3917 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/sqlalchemy@3918 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/contrib/auth/models.py')
-rw-r--r--django/contrib/auth/models.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py
index eb5713ba57..73bcfe92aa 100644
--- a/django/contrib/auth/models.py
+++ b/django/contrib/auth/models.py
@@ -216,6 +216,8 @@ class User(models.Model):
def has_module_perms(self, app_label):
"Returns True if the user has any permissions in the given app label."
+ if not self.is_active:
+ return False
if self.is_superuser:
return True
return bool(len([p for p in self.get_all_permissions() if p[:p.index('.')] == app_label]))