A federal judge in California has rejected Home Depot's attempt to gain broad access to Facebook, Twitter, and other social-network posts made by a former employee who sued the retailer two years ago.

U.S. Magistrate Judge Suzanne Segal ruled this month that the big box retailer had the rights only to "social-networking communications between plaintiff and any current or former Home Depot employees" that relate to her employment or the lawsuit.

The suit was filed by Danielle Mailhoit, previously a manager of Home Depot's Burbank, Calif., store, who was fired after a 2010 investigation of her on-the-job performance. Mailhoit alleges her termination was due to unlawful discrimination against her gender and vertigo, which she says is a physical disability affecting her ability to drive and engage in other "major life activities."

While defending the lawsuit, which was filed in federal court in May 2011, Home Depot's lawyers asked a judge to force Mailhoit to turn over any photos she posted -- or in which she was tagged -- and also posts about:

Any profiles, postings, or messages (including status updates, wall comments, causes joined, groups joined, activity streams, blog entries) from social-networking sites from October 2005 (the approximate date Plaintiff claims she first was discriminated against by Home Depot), through the present, that reveal, refer, or relate to any emotion, feeling, or mental state of Plaintiff, as well as communications by or from Plaintiff that reveal, refer, or relate to events that could reasonably be expected to produce a significant emotion, feeling, or mental state...

Segal, the magistrate judge in Southern California, ruled that the request was too broad.

Federal rules governing access to electronic documents in lawsuits, including items posted on social networks, require that the requests be specific and directly relevant to the lawsuit, Segal said.

Home Depot's requests for posts that revealed Mailhoit's emotional state were "extremely broad" and could "require the production of many materials of doubtful relevance, such as a posting with the statement 'I hate it when my cable goes out,'" Segal ruled.

Its request for photos is also "impermissibly overbroad," Segal ruled, saying Home Depot has not proved "that every picture of plaintiff taken over a seven-year period and posted on her profile by her or tagged to her profile by other people would be considered relevant."

Segal did, however, grant Home Depot's more limited request for Mailhoit's posts about her job or the lawsuit.

Attorneys for Mailhoit, who was reporting to a female district manager, Sherwana Roberson, claim that their client's poor performance review was due to unlawful gender discrimination and that Home Depot did not make "reasonable accommodations for her known disability" of vertigo.