From aa3701865e382ff1344052262f875ccdb3de9c59 Mon Sep 17 00:00:00 2001 From: Sanj Date: Thu, 20 Oct 2011 16:41:34 +0100 Subject: [PATCH] publish page items for superuser --- edgware/editor/models.py | 5 ++++- edgware/files/models.py | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/edgware/editor/models.py b/edgware/editor/models.py index 746d7dd..ff910ee 100644 --- a/edgware/editor/models.py +++ b/edgware/editor/models.py @@ -252,7 +252,10 @@ class Article(models.Model): def get_can_edit_list(kls, user, qset=False): if not qset: qset = kls.objects.all() - return qset.filter(Q(owner=user) | Q(users=user)) + if user.is_superuser: + return qset + else: + return qset.filter(Q(owner=user) | Q(users=user)) # for q in qset: diff --git a/edgware/files/models.py b/edgware/files/models.py index 5acf031..12b1395 100755 --- a/edgware/files/models.py +++ b/edgware/files/models.py @@ -232,6 +232,7 @@ class File(models.Model): class Category(models.Model): name = models.CharField(max_length=255) groups = models.ManyToManyField(Group, null=True) +# descriotion = models.TextField(blank=True) # folder_name = models.CharField(max_length=512) def __unicode__(self):