def reindex_course_and_check_access(course_key, user):
 if (not has_course_author_access(user, course_key)):
  raise PermissionDenied()
 return CoursewareSearchIndexer.do_course_reindex(modulestore(), course_key)

def reindex_course_and_check_access ( course_key , user ) : if ( not has_course_author_access ( user , course_key ) ) : raise PermissionDenied ( ) return CoursewareSearchIndexer . do_course_reindex ( modulestore ( ) , course_key )
internal method used to restart indexing on a course .