Germany’s highest court ruled Thursday (July 12) that the parents of a teenager who died in 2012 after being hit by a train should be allowed to access her Facebook account, including her private messages.

The court argued that digital content should be passed onto heirs like letters, books, or diaries. The girl’s parents wanted to look into her account to determine whether she committed suicide. This would also help determine whether the driver of the train should be entitled to compensation.

Over the course of the legal battle, Facebook refused to give parents access to the account to protect the privacy of the people she was connected to on the platform, the BBC reported.

Currently, Facebook’s policy is to “memorialize” an account when the site is informed of someone’s death. If a user has a “legacy contact” (here are instructions on how to set one up), Facebook grants them limited access to the user’s account, allowing them change the user’s profile picture, accept friend requests, or pin posts to the top of the user’s profile. They can also ask the platform to delete the account. Recently, Facebook told Quartz, the company revised its policy to allow parents or guardians of minors to become legacy contacts after their child has died.

In rare cases, the company says, authorized people, like family members, can request information from a deceased person’s account, if they have a court order. But there’s no guarantee they will get what they need.

A Facebook spokesperson said in a statement the company disagreed with the German ruling:

These questions — how to weigh the wishes of the relatives and protect the privacy of third parties – are some of the toughest we’ve confronted. We empathize with the family. At the same time, Facebook accounts are used for a personal exchange between individuals which we have a duty to protect. While we respectfully disagree with today’s decision by [the court], the lengthy process shows how complex the issue under discussion is. We will be analyzing the judgment to assess its full implications.

As more of our lives are online, the question of what happens to our data after we die becomes both more complicated and pressing. The wishes of family members of a person who has passed away often run into the terms of service of Silicon Valley companies that store their data. In the US, the girl’s parents would not be able to obtain her private messages in a similar situation, Gene Newman, editorial director of Everplans, a company that creates digital estate archives, told Quartz.

There’s been a “lot of progress” in the US when it comes to the regulation of digital estates, Newman said, but, “it’s still such a tricky area.” Companies are extra-careful when it comes to granting a third-party access to someone’s account because of potential abuses.

Many US states have in recent years passed regulations which enable fiduciary access to a deceased person’s accounts, but the person has to legally grant the right to their communications to someone trusted before they die.

Today, inheriting digital assets can be quite complicated, but in the future, Newman said, they will likely be treated “as the stuff in your house.”

For now, especially if you don’t live in a state with one of these fiduciary laws, Newman recommends sharing passwords with your loved ones if you want them to be in full control of your accounts when you die—even though this might technically breach some of the tech companies terms of service, which stipulate that only one person should be associated with one account.