A man who accused his male boss of sexual harassment can go forward with his lawsuit because California law prohibits such harassment between people of the same sex, a state appeals court has ruled.The 2nd District Court of Appeal on Friday reinstated a lawsuit by a male screenwriter who said he spurned the sexual advances of his male boss, the president of Silver Pictures, and had to quit his job. The screenwriter, Wayne Mogilefsky, said in his suit that Michael Levy demanded that Mogilefsky stay overnight in his hotel suite on two occasions, and told him the first time that he would make more money if he complied. He also said Levy made various sexual remarks to him and later falsely told others that the two had had sex. Mogilefsky said he refused the demands and later left his job in disgust. The allegations have been denied by Silver Pictures and by Levy, who resigned as president earlier this year. Levy also sought dismissal of the suit on the grounds that the accusations, even if true, would not demonstrate sexual harassment. L.A. Superior Court Judge Lawrence Waddington had dismissed the suit, saying it was not a sexual harassment claim, but was overruled by the appeals court. The court said state law prohibits two types of sexual harassment: Making a job or its benefits conditional on an employee’s response to sexual advances, or creating a hostile and abusive work environment. Both constitute harassment “because of sex, regardless of the sex of the victim,” the court said.