One of the few things the government has done right
The only morale problem an employee would have with full disclosure of everyone's salaries would be for the pathetically poor performing employee. And frankly, nobody gives a damn if they happen to have low morale. That's the whole point. To discourage them from staying in your company and dragging it down, while encouraging them to be seeking a job more suited to their skills and temperment.
Everyone in the military and the government knows how much everyone makes. That provides a certain drive to better yourself to reach the next level with absolutely known rewards for success.