Commit 08aafc58 by Kevin Chugh

refactor to add access control to already_existing access control routines in access.py

parent a2bbb65d
...@@ -134,7 +134,7 @@ def _has_access_course_desc(user, course, action): ...@@ -134,7 +134,7 @@ def _has_access_course_desc(user, course, action):
Can this user access the forums in this course? Can this user access the forums in this course?
""" """
return (CourseEnrollment.is_enrolled(request.user, course_id) or \ return (CourseEnrollment.is_enrolled(request.user, course_id) or \
_has_staff_access_to_descriptor(user, course) _has_staff_access_to_descriptor(user, course))
def can_enroll(): def can_enroll():
""" """
......
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