Any officer of the said corporation of the City of Woodbury who may be sued for any act or thing done in his official capacity may be justified under this Charter, and that the provision of this Charter may be pleaded and shall be a full defense to any action brought against the mayor and council of said city, or either of them, for any act or acts done by them, under and in accordance with its provisions and in accordance with the ordinances passed in pursuance thereof.