An action may be brought by any state's attorney in the name of the state, upon his own information or upon the complaint of a private party, or an action may be brought by any person who has a special interest in the action, on leave granted by the circuit court or judge thereof, against the party offending in the following cases:
(1) When any person shall usurp, intrude into, or unlawfully hold or exercise any public office, civil or military, or any franchise within this state, or any office in a corporation created by the authority of this state;(2) When any public officer, civil or military, shall have done or suffered an act which, by the provisions of law, shall make a forfeiture of his office;(3) When any association or number of persons shall act within this state as a corporation, without being duly incorporated. CCivP 1877, § 534; CL 1887, § 5348; RCCivP 1903, § 573; RC 1919, § 2784; SL 1919, ch 289, § 4; SDC 1939 & Supp 1960, § 37.0509.