Permalink
Browse files

superusers no longer receive all notices -- if you want to see all no…

…tices, use admin

git-svn-id: http://django-notification.googlecode.com/svn/trunk@65 590c3fc9-4838-0410-bb95-17a0c9b37ca9
  • Loading branch information...
1 parent 658021a commit 5fab724bbf36a26236ce51cb9a02144122ce3bff @jtauber jtauber committed Jun 15, 2008
Showing with 2 additions and 8 deletions.
  1. +2 −8 notification/models.py
@@ -2,7 +2,6 @@
from django.db import models
from django.conf import settings
-from django.db.models import Q
from django.db.models import get_model
from django.core.urlresolvers import reverse
from django.template.loader import render_to_string
@@ -289,16 +288,11 @@ def notices_for(user, archived=False):
If archived=False, it only include notices not archived.
If archived=True, it returns all notices for that user.
- Superusers receive all notices.
"""
- if user.is_superuser:
- q = Q()
- else:
- q = Q(user=user)
if archived:
- return Notice.objects.filter(q)
+ return Notice.objects.filter(user=user)
else:
- return Notice.objects.filter(q, archived=archived)
+ return Notice.objects.filter(user=user, archived=archived)
def unseen_count_for(user):

0 comments on commit 5fab724

Please sign in to comment.