Merge branch 'result-notification' of github.com:pinax/symposion into result-notification

This commit is contained in:
James Tauber 2012-09-08 19:21:20 -04:00
commit 81710fc301

View file

@ -400,6 +400,9 @@ def result_notification_prepare(request, section_slug, status):
if request.method != "POST":
return HttpResponseNotAllowed(["POST"])
if not request.user.has_perm("reviews.can_manage_%s" % section_slug):
return access_not_permitted(request)
proposal_pks = []
try:
for pk in request.POST.getlist("_selected_action"):
@ -430,10 +433,14 @@ def result_notification_prepare(request, section_slug, status):
return render(request, "reviews/result_notification_prepare.html", ctx)
@login_required
def result_notification_send(request, section_slug, status):
if request.method != "POST":
return HttpResponseNotAllowed(["POST"])
if not request.user.has_perm("reviews.can_manage_%s" % section_slug):
return access_not_permitted(request)
if not all([k in request.POST for k in ["proposal_pks", "subject", "body"]]):
return HttpResponseBadRequest()