Commit 3f8fb59a authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Merge branch 'feature/booksale' into 'master'

Enable booksale to freshmen before 01-09

Closes #474

See merge request !654
parents 9b5cd294 3330f9a8
......@@ -3,7 +3,9 @@ import os
from datetime import datetime, date
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.shortcuts import get_object_or_404, render
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from sendfile import sendfile
......@@ -121,4 +123,9 @@ def submit_summary(request, id=None):
@login_required
def books(request):
return render(request, 'education/books.html')
if (request.member and request.member.is_authenticated and
(request.member.current_membership or
(request.member.earliest_membership and
request.member.earliest_membership.since > timezone.now()))):
return render(request, 'education/books.html')
return HttpResponse(status=403)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment