But if you’re a nonunion private employee, your boss has great latitude to control your political actions. As Lee Tien, a lawyer with the Electronic Frontier Foundation, put it, “You don’t have the right to speak freely in the workplace.” Or even outside it.

It’s an issue that bubbles up around every major election, said Paula Brantner, executive director of Workplace Fairness, an informational site for employees. But the combination of intense political polarization, the Internet’s power to spread and magnify seemingly innocuous or private statements and technology’s growing ability to blur the line between workplace and home, make it a conundrum for employers and employees.

So it’s crucial that workers and their bosses understand their rights and responsibilities.

Here are the two most important points:

For private employees, who account for about 85 percent of the work force, the First Amendment’s guarantee offers no protection from being fired for something you’ve said, either in the workplace or outside of it, as on social media. That’s because the amendment addresses actions by the government to impede free speech, not by the private sector.

And while federal laws bar employers from firing workers because of such variables as their race, religion and gender, there is no such protection for political affiliation or activity.

A handful of states and localities address this issue, among them New York, California, Colorado, North Dakota and the District of Columbia. The broadest-based laws, such as those in California and New York, make it illegal to discriminate on the basis of an employees’ political activity or beliefs in or out of work, Ms. Brantner said, unless such activity interferes with the functioning of the business.