summaryrefslogtreecommitdiff
path: root/yaksh
diff options
context:
space:
mode:
authoradityacp2017-04-04 10:42:22 +0530
committeradityacp2017-04-04 10:42:22 +0530
commit09756c7db9341aace9e9ac25c9078c8cd4bf8399 (patch)
tree387e80eb718e40ce5077c853eef1d2e89cd3693e /yaksh
parentc1bdc56f889e60a246e6fccb450f339b68897395 (diff)
downloadonline_test-09756c7db9341aace9e9ac25c9078c8cd4bf8399.tar.gz
online_test-09756c7db9341aace9e9ac25c9078c8cd4bf8399.tar.bz2
online_test-09756c7db9341aace9e9ac25c9078c8cd4bf8399.zip
Fix failing test views test
Diffstat (limited to 'yaksh')
-rw-r--r--yaksh/views.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index 247aca4..661d472 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -661,7 +661,8 @@ def course_detail(request, course_id):
raise Http404('You are not allowed to view this page')
course = get_object_or_404(Course, pk=course_id)
-
+ if not course.is_creator(user) and not course.is_teacher(user):
+ raise Http404('This course does not belong to you')
return my_render_to_response('yaksh/course_detail.html', {'course': course},
context_instance=ci)