When Sarah Huckabee Sanders took to her official Twitter account to recount how she was kicked out of a Virginia restaurant, it launched a vicious online attack campaign against the establishment. It also amounted to a violation of federal ethics laws. At least according to the former head of the U.S. office of Government Ethics. “Last night I was told by the owner of Red Hen in Lexington, VA to leave because I work for @POTUS and I politely left,” Sanders tweeted on Saturday from her official @PressSec account as online reports about the incident began to spread. “Her actions say far more about her than about me.”

Last night I was told by the owner of Red Hen in Lexington, VA to leave because I work for @POTUS and I politely left. Her actions say far more about her than about me. I always do my best to treat people, including those I disagree with, respectfully and will continue to do so — Sarah Sanders (@PressSec) June 23, 2018

Walter Shaub, who was the federal government’s top ethics watchdog for five years until mid-2017, said the tweet amounted to a clear violation of federal ethics laws. “Sarah, I know you don’t care even a tiny little bit about the ethics rules, but using your official account for this is a clear violation of 5 CFR 2635.702(a),” Shaub wrote on Twitter. He was referring to a section of the law that says government employees can’t use their public position for private gain. “It’s the same as if an ATF agent pulled out his badge when a restaurant tried to throw him/her out,” Shaub explained.

Sarah, I know you don’t care even a tiny little bit about the ethics rules, but using your official account for this is a clear violation of 5 CFR 2635.702(a). It’s the same as if an ATF agent pulled out his badge when a restaurant tried to throw him/her out. https://t.co/Fj6OfBAdew — Walter Shaub (@waltshaub) June 23, 2018

Shaub later expanded on his idea, detailing why the tweet amounted to a violation. “Sanders used her official govt account to condemn a private business for personal reasons. Seeks to coerce business by using her office to get public to pressure it,” Shaub wrote. “Violates endorsements ban too, which has an obvious corollary for discouraging patronage.” Although Sanders is free to “lob attacks on her own time” she can’t do it “using her official position.”

Sanders used her official govt account to condemn a private business for personal reasons. Seeks to coerce business by using her office to get public to pressure it. Violates endorsements ban too, which has an obvious corollary for discouraging patronage. Misuse reg covers both. — Walter Shaub (@waltshaub) June 23, 2018

Opening sentences of 5 CFR 2635.702 cover both; 702(a) gives example of coercion; 702(c) gives example of endorsement. Also 2635.101(b)(8) bars preferential treatment, with obvious corollary for singling out. She can lob attacks on her own time but not using her official position — Walter Shaub (@waltshaub) June 23, 2018

Ian Bassin, a former White House lawyer, agreed, writing on Twitter that Sanders’ tweet “violates federal ethics rules.” Bassin noted that at the White House. “we trained all staff they couldn’t use their WH titles or resources (like Twitter acct) for personal uses like making restaurant reservations or promoting businesses.” Bassin went on to point out that Sanders’ tweet would have been “fine from a personal account” but “not WH one.”

When I was a WH lawyer we trained all staff they couldn’t use their WH titles or resources (like Twitter acct) for personal uses like making restaurant reservations or promoting businesses. So yes, this tweet violates federal ethics rules. I’m sure Don McGahn will remind her. https://t.co/2t2JCVb5B7 — Ian Bassin (@ianbassin) June 24, 2018