Commit 541aa084 by Your Name

update forum access to include check for valid date range

parent a36e3b19
......@@ -134,8 +134,10 @@ def _has_access_course_desc(user, course, action):
"""
Can this user access the forums in this course?
"""
return (CourseEnrollment.is_enrolled(user, course.id) or \
_has_staff_access_to_descriptor(user, course))
return (can_load() and \
(CourseEnrollment.is_enrolled(user, course.id) or \
_has_staff_access_to_descriptor(user, course)
))
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