A South Korean court has ruled against a former senior official at the Korea Food Research Institute who sought to overturn his dismissal.