It is a royal privilege to do good and be ill spoken of.
"Lives and Opinions of the Eminent Philosophers" by Diogenes Laërtius, (§ 3),

It is a royal privilege to do good and be ill spoken of.