The action is open to all those who have a legitimate interest in the success or rejection of a claim, subject to cases in which the law attributes the right to act only to persons whom it qualifies to raise or combat a claim, or to defend a specific interest.