It's usually up to the aviation authority of each country. In the United States, the FAA can issue an airworthiness directive with specific operation limitations and restrictions that could ground aircraft until inspections and/or repairs have been completed.