A law unto oneself

Someone who makes one’s own laws or rules.

The city council member was a law unto herself until she had to quit because of a scandal.