There are two court cases that could fit this question.
Schenck v. United States which restricted the public's free speech in a pamphlet that that discouraged people from serving in the military during war times
or
Korematsu v. United States which which upheld Franklin Roosevelt's Executive Order as constitutional, allowing the US military to place Japanese residents /Japanese-Americans living on the west coast into internment camps during World War II, to maintain national security.