diff options
author | CruiseDevice | 2020-09-23 17:27:53 +0530 |
---|---|---|
committer | ankitjavalkar | 2020-10-08 10:42:51 +0530 |
commit | 74366df12bdf352b227540244ee6df35e596007a (patch) | |
tree | 233c50149d18cbdf921d347c26eddf80bbcb766f /yaksh/views.py | |
parent | 31e258a9d2e253691fd548d47aaab3cfee756322 (diff) | |
download | online_test-74366df12bdf352b227540244ee6df35e596007a.tar.gz online_test-74366df12bdf352b227540244ee6df35e596007a.tar.bz2 online_test-74366df12bdf352b227540244ee6df35e596007a.zip |
Show trash icon in forum only to course creator and teacher
Diffstat (limited to 'yaksh/views.py')
-rw-r--r-- | yaksh/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index e465369..8c9a9e4 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -3574,7 +3574,7 @@ def post_comments(request, course_id, uuid): def hide_post(request, course_id, uuid): user = request.user course = get_object_or_404(Course, id=course_id) - if (not course.is_creator(user) or not course.is_teacher(user)): + if (not course.is_creator(user) and not course.is_teacher(user)): raise Http404( 'Only a course creator or a teacher can delete the post.' ) @@ -3591,7 +3591,7 @@ def hide_comment(request, course_id, uuid): user = request.user if course_id: course = get_object_or_404(Course, id=course_id) - if (not course.is_creator(user) or not course.is_teacher(user)): + if (not course.is_creator(user) and not course.is_teacher(user)): raise Http404( 'Only a course creator or a teacher can delete the comments' ) |