From 7bed6ad9013b733c0d18699e4c4ccc8c60baf5be Mon Sep 17 00:00:00 2001 From: hardythe1 Date: Mon, 24 Nov 2014 13:57:46 +0530 Subject: added a group moderator for people who will review papers --- website/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/views.py b/website/views.py index 9f8d310..d4681b4 100644 --- a/website/views.py +++ b/website/views.py @@ -100,7 +100,7 @@ def call_for_proposals(request, action=None): # GET if request.user.is_authenticated(): user = request.user - if user.username == "fossee": + if user.groups.filter(name='moderator').exists(): return HttpResponseRedirect('/2014/cfp-view-abstracts') # Checking whether proposal exists if Proposal.objects.filter(user=request.user).exists(): @@ -118,7 +118,7 @@ def view_abstracts(request): user = request.user context = {} if user.is_authenticated(): - if user.username == "fossee": + if user.groups.filter(name='moderator').exists(): proposals = Proposal.objects.all() context['proposals'] = proposals context['user'] = user @@ -133,7 +133,7 @@ def abstract_details(request, proposal_id=None): user = request.user context = {} if user.is_authenticated(): - if user.username == "fossee": + if user.groups.filter(name='moderator').exists(): proposal = Proposal.objects.get(id=proposal_id) if request.method == 'POST': comment = Comments() -- cgit