I believe so. I used to do that as a judge.
In this case, I was appointed for only six months. I'll leave my personal views at the door and focus on the cases at hand. Whatever my personal views are, I have to deal with the issues entrusted to me and consider the consequences of my decisions for those individuals, not for me personally, without taking my political views into account.