summaryrefslogtreecommitdiff
path: root/postgresqleu
diff options
context:
space:
mode:
authorMagnus Hagander2014-07-08 14:00:14 +0000
committerMagnus Hagander2014-07-08 14:00:14 +0000
commitc30ddb71f668fab9bae8ba9d552ac268e3bd7c1c (patch)
tree3d77ef2c8efbf171d01802bb7db18b5082f11b3c /postgresqleu
parent1463be2bcaae145231908d415a50f6ffeca39cbd (diff)
Don't show email about prepaid batches to end-users
Diffstat (limited to 'postgresqleu')
-rw-r--r--postgresqleu/confreg/views.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/postgresqleu/confreg/views.py b/postgresqleu/confreg/views.py
index 08d67b01..b8f055a7 100644
--- a/postgresqleu/confreg/views.py
+++ b/postgresqleu/confreg/views.py
@@ -827,12 +827,14 @@ def viewvouchers(request, batchid):
# WARNING! THIS VIEW IS NOT RESTRICTED TO ADMINS!
# The same view is also used by the person who bought the voucher!
# therefor, we need to make very sure he has permission!
+ userbatch = False
if not request.user.has_module_perms('invoicemgr'):
# Superusers and invoice managers gain access through the generic
# permission. Anybody else can only view his/her own batches
batch = PrepaidBatch.objects.get(pk=batchid)
if batch.buyer != request.user:
raise Http404()
+ userbatch = True
else:
# User has direct permissions, just retrieve the batch
batch = PrepaidBatch.objects.get(pk=batchid)
@@ -843,6 +845,7 @@ def viewvouchers(request, batchid):
return render_to_response('confreg/prepaid_create_list.html', {
'batch': batch,
'vouchers': vouchers,
+ 'userbatch': userbatch,
})