LANSING, Mich. — An assistant attorney general is using his personal blog to target the openly gay leader of the University of Michigan’s student assembly, calling him a racist with a “radical homosexual agenda.” The lawyer claims that when he’s not at work, he has the right to say whatever he wants.

But the vociferous criticism has raised questions of just how far a civil servant can go, and whether Andrew Shirvell’s online attacks — which include putting a swastika over a gay pride flag in a photo of 21-year-old Chris Armstrong — should affect his job.