Such injunction shall be issued only in case it is shown at the hearing that the watermaster has failed to distribute the water according to the rights as determined by decrees of court, agreements, permits, or licenses as provided in this part.
Ca. Water Code § 4161