summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/views.py')
-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)