A good faith reliance on a court order or legislative authorization constitutes a complete defense to an action brought under Article 18A.502 or 18A.503.