A person who has a legal interest in the matter in litigation, or in the success of either of the parties, or an interest against both, or is so situated as to be adversely aected by a distribution or other disposition of property in the custody of the court or of an ocer thereof may, with leave of court, be allowed to intervene in the action.