Commit cd479caa by Diana Huang

Make sure users are logged in on the verified cert path

parent b5feb074
...@@ -36,7 +36,7 @@ class ChooseModeView(View): ...@@ -36,7 +36,7 @@ class ChooseModeView(View):
return render_to_response("course_modes/choose.html", context) return render_to_response("course_modes/choose.html", context)
@method_decorator(login_required)
def post(self, request, course_id): def post(self, request, course_id):
user = request.user user = request.user
......
...@@ -13,6 +13,7 @@ from django.core.urlresolvers import reverse ...@@ -13,6 +13,7 @@ from django.core.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseRedirect from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseRedirect
from django.shortcuts import redirect from django.shortcuts import redirect
from django.views.generic.base import View from django.views.generic.base import View
from django.utils.decorators import method_decorator
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
from django.utils.http import urlencode from django.utils.http import urlencode
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
...@@ -30,6 +31,7 @@ log = logging.getLogger(__name__) ...@@ -30,6 +31,7 @@ log = logging.getLogger(__name__)
class VerifyView(View): class VerifyView(View):
@method_decorator(login_required)
def get(self, request, course_id): def get(self, request, course_id):
""" """
""" """
...@@ -73,6 +75,7 @@ class VerifiedView(View): ...@@ -73,6 +75,7 @@ class VerifiedView(View):
View that gets shown once the user has already gone through the View that gets shown once the user has already gone through the
verification flow verification flow
""" """
@method_decorator(login_required)
def get(self, request, course_id): def get(self, request, course_id):
""" """
Handle the case where we have a get request Handle the case where we have a get request
...@@ -93,6 +96,7 @@ class VerifiedView(View): ...@@ -93,6 +96,7 @@ class VerifiedView(View):
return render_to_response('verify_student/verified.html', context) return render_to_response('verify_student/verified.html', context)
@login_required
def create_order(request): def create_order(request):
""" """
Submit PhotoVerification and create a new Order for this verified cert Submit PhotoVerification and create a new Order for this verified cert
......
Markdown is supported
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