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