On Monday, just a couple of hours after acting Attorney General Sally Yates ordered the Department of Justice not to defend Donald Trump's refugee ban, Donald Trump fired Yates. Yes, that's right: America's acting attorney general stood up to say, publicly, that working under Donald Trump was not in line with her goal "to always seek justice and stand for what is right," and President Trump... fired her. So, was it legal for Donald Trump to fire Sally Yates?
In short: Yes. When Donald Trump became president of the United States, he was promised executive power (with some exceptions). When he was sworn in, he was granted that power, and that power gives him the right to fire an acting Attorney General. Although legal experts and concerned citizens alike may take issue with his firing an individual who acted against his orders, Trump is technically within his rights to do so.
This is a different situation from the infamous "Saturday Night Massacre" of 1973, for example, when President Nixon fired his attorney general and deputy attorney general in the wake of Watergate. Trump did not nominate Yates, for a start, but merely asked her to stay on in the position until he was able to confirm his nominated replacement, Jeff Sessions. Yates was always temporary.
That said, there are many logistical issues that come hand-in-hand with firing Yates, not to mention ethical and political issues. For a start, Yates is the only person in the Justice Department who has been confirmed and is sufficiently senior to sign foreign surveillance warrants. Until Sessions is (presumably) confirmed, there is quite literally nobody around to legally sign those warrants.
According to a White House statement released about Yates, the former acting AG "betrayed the Department of Justice by refusing to enforce a legal order designed to protect the citizens of the United States.”
Shortly after Yates was fired, #ThankYouSally began trending on Twitter.
Yates has been replaced as acting Attorney General by Dana Boente, the U.S. Attorney for the Eastern District of Virginia.