The Supreme Court yesterday declined to disturb a ruling that a civil-rights law was violated by the firing of a Seventh Day Adventist who, because of his faith, refused to join or support a union while accepting its services.

The case involved David Anderson of San Diego, General Dynamics Corp., and a local of the International Association of Machinists and Aero-space Workers, AFL-CIO, at the corporation's Convair Aerospace Division.

Justices William J. Brennan Jr. and Bryon R. White wanted to hear argument in the case. They needed the votes of two more justices to prevail.

In 1972, the company agreed for the first time to a union-security clause in the collective-bargainging agreement under which membership in the IAM became for every person in the bargaining unit "a condition of continued employment. . . ."

Citing a basic principle of his church that its members not contribute to unions, Anderson refused to join the local or to accept an alternative offered by the union: a payroll deduction equivalent to dues as either a fee for services of a contribution to charity.

At the same time, expressing a general distrust of unions, Anderson said that in lieu of dues he was willing to contribute the sum at issue directly to a charity.

After negotiation between Anderson and the IAM failed, the local asked the company to comply with the union-security clause by firing him. Anderson sued but lost in U.S. District Court. Last September, however, the 9th U.S. Circuit Court of Appeals reversed on the basis of a provision of the Civil Rights Act of 1964.

The provision eliminates religion as a consideration in the workplace unless an employer demonstrates that he is unable "to reasonably accommodate to an employe's . . . religious observance or practice without undue hardship on the conduct of the employer's business."

The union hadn't carried the burden of proving that, "without undue hardship," it couldn't "reasonably accommodate Anderson's religious convictions," Circuit Judge Shirley M. Hufstedler wrote. Neither the company nor the union "did anything to accommodate Anderson's religious beliefs," she said. And the judge continued, "neither the union nor the employer offered any evidence to prove that union members thought that a person was a free rider if he paid the equivalent of dues to charity, nor was there any evidence offered to prove as a fact that the accommodation of Anderson would otherwise have been an unduly difficult problem for the union."

The company had fired Anderson in 1962 and again in 1968 for refusing to work Saturtdays, the Seventh Day Adventist Sabbath. Each time he was reinstated through the efforts of the union, which is required by federal law to represent everyone in its jurisdiction.

In another defeat for the IAM, the high court refused to review a ruling ordering a local at Kennedy International Airport in New York to reinstate a member it had expelled for "misconduct" in the form of advocacy of "communist" ideas,"

The local tried and expelled William Turner, a Varig Airlines cargo agent, after he campaigned for re-election as a shop steward with leaflets characterizing his political ideas as "communist" but not "anti-American." "The ultimate change I want to see is for the workers to own and control all property," he said.

But his opponents, charging that he "was constantly advocating the violent overthrow of the United States government by force and the killing of capitalists," filed charges with the local that he had violated a ban in the union constitution on encouragement of "communism, fascism, nazism, or any other totalitarian philosophy . . ."

Turner sued for reinstatement. U.S. District Court Judge Mark A. Constantino ruled that by expelling him for advocating "controversial, unpopular views," the union engaged in precisely th type of restraint of expression that Congress tried to prevent in the Labour Management and Reporting Disclosure Act of 1959.

Th 2nd U.S. Circuit Court of Appeals affirmed, finding the union's anti-totalitarian ban a "flat violation of the right of free speech" in the 1959 law. But it emphasized that the case "does not in any way involve the Communist Party . . . Turner had explained his 'communist views' as 'a la Karl Marx, not Brezhnev, Mao or Castro.'"

The court took other actions. "CONTACT VISITS"

Three weeks ago, the court ruled that persons being detained for trial - and presumed innocent- aren't unconstitutionally deprived of their liberty by certain jail practices, such as putting two persons in a room intended for one and anal and genital searches for contraband.

In the light of the decision, the court yesterdau nullified a 2nd circuit decision requiring 43 New YorkState jail to spend the sums necessary to assure pretrail detainees theright to "contact visits," which it defined as the right "to shake hands with a friend, to kiss a wife, or to fondle a child." An appeals court dissenter, finding the definition vague, had wondered whether private facilities were to be provided "to kiss a child and to fondle a wife . . ."