Only link to reviews for the current conference

This commit is contained in:
Ben Sturmfels 2024-05-29 21:39:52 +10:00
parent 64a94cc807
commit 28c73b4295
Signed by: bsturmfels
GPG key ID: 023C05E2C9C068F0

View file

@ -1,10 +1,11 @@
from django.conf import settings
from symposion.proposals.models import ProposalSection from symposion.proposals.models import ProposalSection
def reviews(request): def reviews(request):
sections = [] sections = []
manage_sections = {} manage_sections = {}
for section in ProposalSection.objects.all(): for section in ProposalSection.objects.filter(section__conference__id=settings.CONFERENCE_ID):
if request.user.has_perm("reviews.can_review_%s" % section.section.slug): if request.user.has_perm("reviews.can_review_%s" % section.section.slug):
sections.append(section) sections.append(section)
if request.user.has_perm("reviews.can_manage_%s" % section.section.slug): if request.user.has_perm("reviews.can_manage_%s" % section.section.slug):