When there are several claimants to the same office or franchise, one action may be brought against all to determine their respective rights.