The ruling was in response to a lawsuit brought by the American Federation of Government Employees last month.