def redirect_if_blocked(course_key, access_point='enrollment', **kwargs):
 if settings.FEATURES.get('EMBARGO'):
  is_blocked = (not check_course_access(course_key, **kwargs))
  if is_blocked:
   if (access_point == 'courseware'):
    if (not RestrictedCourse.is_disabled_access_check(course_key)):
     return message_url_path(course_key, access_point)
   else:
    return message_url_path(course_key, access_point)

def redirect_if_blocked ( course_key , access_point = 'enrollment' , ** kwargs ) : if settings . FEATURES . get ( 'EMBARGO' ) : is_blocked = ( not check_course_access ( course_key , ** kwargs ) ) if is_blocked : if ( access_point == 'courseware' ) : if ( not RestrictedCourse . is_disabled_access_check ( course_key ) ) : return message_url_path ( course_key , access_point ) else : return message_url_path ( course_key , access_point )
redirect if the user does not have access to the course .