Court backs code of conduct