Whenever, by the provisions of this code, a power is granted to, or a duty imposed upon, a public officer, the power may be exercised or the duty performed by a deputy of the officer or by a person authorized, pursuant to law, by the officer, unless this code expressly provides otherwise.