'Determines if the user is staff or an instructor for the course.
Always returns True if DEBUG mode is enabled.'

def user_can_access_course(self, user, course):

    return bool((settings.DEBUG or has_access(user, CourseStaffRole.ROLE, course) or has_access(user, CourseInstructorRole.ROLE, course)))
