My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions

Issue 60 attachment: forum-issue60-anonviews.diff (777 bytes)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Index: managers.py
===================================================================
--- managers.py (revision 38)
+++ managers.py (working copy)
@@ -3,9 +3,11 @@

class ForumManager(models.Manager):
def for_groups(self, groups):
- public = Q(groups__isnull=True)
- user_groups = Q(groups__in=groups)
- return self.filter(public|user_groups)
+ if groups:
+ public = Q(groups__isnull=True)
+ user_groups = Q(groups__in=groups)
+ return self.filter(public|user_groups)
+ return self.filter(groups__isnull=True)

def has_access(self, forum, groups):
- return forum in self.for_groups(groups)
\ No newline at end of file
+ return forum in self.for_groups(groups)

Powered by Google Project Hosting