tickets: Require valid permissions for the payments view.
authorMatthijs Kooijman <matthijs@stdin.nl>
Tue, 19 Oct 2010 15:19:40 +0000 (17:19 +0200)
committerMatthijs Kooijman <matthijs@stdin.nl>
Tue, 19 Oct 2010 15:47:30 +0000 (17:47 +0200)
tickets/views.py

index c89d26ab041f5c5386aa62b0cf29c355136142e3..a6dff544363d6f6107337f56f3c69de29534ac92 100644 (file)
@@ -5,6 +5,7 @@ import datetime
 import django
 from django.shortcuts import render_to_response
 from django.template import RequestContext
+from django.contrib.auth.decorators import permission_required
 
 from models import Booking, TICKET_PRICE
 
@@ -84,6 +85,7 @@ class PaymentConfirmForm(django.forms.Form):
     # This field is used to distinguish these two forms
     confirm = django.forms.BooleanField(initial=True, widget=django.forms.HiddenInput)
 
+@permission_required('tickets.change_booking')
 def payments(request):
     c = {}
     bookings = None