The circuit court may issue writs of injunction for affirmative relief having the force and effect of a writ of restitution restoring any person to the possession of any mining property:
The granting of the writ extends only to the right of possession under the facts of the case with respect to the manner in which the possession was obtained, leaving the parties to their legal rights on all other questions as though no such writ had been issued.
SDCL 45-4-22