diff options
-rw-r--r-- | server/views.py | 10 | ||||
-rw-r--r-- | version.txt | 2 |
2 files changed, 3 insertions, 9 deletions
diff --git a/server/views.py b/server/views.py index f8b0865..d471e65 100644 --- a/server/views.py +++ b/server/views.py @@ -51,18 +51,12 @@ def index(request): # if user is staff of not primary show only public types
if request.user.is_staff:
groups = request.user.groups.all()
-
- q_obj = Q(group__in=groups)
-
- doc_types = DocumentType.objects.filter(
- (Q(group_private=False) | q_obj) & Q(enabled=True)).order_by("-id")
else:
groups = request.user.groups.all()[1:]
- q_obj = Q(group__in=groups)
+ q_obj = Q(group__in=groups)
- doc_types = DocumentType.objects.filter(
- Q(group_private=False) & Q(enabled=True) & q_obj).order_by("-id")
+ doc_types = DocumentType.objects.filter(q_obj & Q(enabled=True)).order_by("-id")
# check for settings
group_check = []
diff --git a/version.txt b/version.txt index fa522cc..09bb923 100644 --- a/version.txt +++ b/version.txt @@ -1,2 +1,2 @@ version=0.5 -rev=23 +rev=24 |