def _has_access_course_key(user, action, course_key):
 checkers = {'staff': (lambda : _has_staff_access_to_location(user, None, course_key)), 'instructor': (lambda : _has_instructor_access_to_location(user, None, course_key))}
 return _dispatch(checkers, action, user, course_key)

def _has_access_course_key ( user , action , course_key ) : checkers = { 'staff' : ( lambda : _has_staff_access_to_location ( user , None , course_key ) ) , 'instructor' : ( lambda : _has_instructor_access_to_location ( user , None , course_key ) ) } return _dispatch ( checkers , action , user , course_key )
check if user has access to the course with this course_key valid actions: staff : true if the user has staff access to this location instructor : true if the user has staff access to this location .