Public-sector unions and their progressive allies just lost a major battle in their ceaseless legal campaign against this president.

Last summer, one district court judge struck down nearly every provision in a package of executive orders meant to curtail the overweening power of federal employee unions.

Almost a year later, the United States Court of Appeals for the D.C. Circuit rightly overturned the decision. In fact, it determined that Judge Ketanji Brown Jackson, an Obama appointee to the U.S. District Court for D.C., should never have heard the case in the first place.

One of the biggest impacts of the executive orders is to sharply curtail a wasteful practice known by the Orwellian moniker “official time.” This practice allows federal employees to do union business instead of their actual job during their regular working hours, while being paid their regular wage.

While official time was authorized by statute back in 1978, its use is now out of control.

In 2016, the Office of Personnel Management found that federal employees spent a combined 3.6 million hours working on union business during the work day (though this is likely a significant underestimate). Indeed, thousands of federal employees throughout the government do nothing other than union business while at work.

Nonetheless, Jackson ruled that circumscribing the use of official time—as the Trump administration attempted to do—is a violation of the law. She argued this provision “exacerbates management’s advantages over labor and hampers unions’ ability to engage effectively in future collective bargaining, contrary to the clearly articulated goals of the [Federal Service Labor-Management Relations Statute].”

Of course, a plain reading of the law does not mandate any amount of official time. But, in classic progressive fashion, Jackson ignored the actual provisions of the statute in favor of a highly impressionistic reading of the relevant law’s preamble.

The executive orders also limit the sorts of concessions agencies are permitted to make to public-sector unions during collective bargaining.

Under federal labor law, agencies and unions are required to hash out certain topics in their negotiations, such as how employees can appeal a disciplinary action. Agencies are given the choice of whether to bargain over other issues, like the division of labor between offices and employees.

One of the executive orders directs management to bargain with unions over only those issues the law requires.

Jackson ruled that this provision of Trump’s executive orders also violates the law. She reasoned that, even though management is not required to bargain over the issues the executive orders cover, if an agency comes to the bargaining table only prepared to discuss a few mandated issues, it is are not making a “good faith effort” to reach an agreement.

Faulty as this judge’s interpretation of the law is, the D.C. Circuit found that dissecting Jackson’s opinion was simply unnecessary as she had no authority to render a judgment in the first place. There is, after all, an entire agency dedicated to hearing exactly the sort of labor-management disputes raised by the Trump administration’s executive orders.

The Federal Labor Relations Authority exists solely to adjudicate complaints of unfair labor practices in the federal government. Before they get their day in court, labor unions and agency management are required by law to appear before this body.

Based on a tortured reading of both the law and precedent, Jackson argued that the Federal Labor Relations Authority is only meant to hear garden variety labor disputes, not cases with constitutional implications and government-wide consequences.

But the D.C. Circuit shot this argument down, pointing out that “these matters lie at the core of the [Federal Labor Relations Authority’s] ‘specialized expertise in the field of federal labor relations.’”

The injunction finally lifted, the Trump administration can now begin to implement the provisions of the three executive orders in question. But this does not mean over-the-top use of official time and hyper-conciliatory collective bargaining agreement are a thing of the past.

Federal employee unions will certainly challenge them before the Federal Labor Relations Authority. When, as federal HR expert Jeff Neal predicts, the executive orders are upheld, the unions will get another chance to challenge them in court. But this time, the case will need to be decided on the merits.

If a fair-minded judge or justice has the final word, the Trump administration’s executive orders will hold up in court. While the appointment of certain “officers of the United States” is subject to the advice and consent of the Senate, the president should have plenary power over the working conditions of those employed within the executive branch.

In order “to take care that the laws be faithfully executed,” as the Constitution directs him to do, the president must have the authority to direct and discipline the personnel of the executive branch.