Except as otherwise provided by law, if the mayor, any other commissioner or any other officer of the city is sued for any acts or things done in said person's official capacity under and in accordance with this Charter and the ordinances passed in pursuance hereof, said person may be justified under this Charter, and the provisions of this Charter may be pleaded and shall be a full defense to any action brought against such officer.