The ACLU of California and the Drug Policy Alliance are suing Fontana, claiming that the city’s marijuana ordinance conflicts with rights granted to all Californians under Proposition 64.

The suit may be the first legal test of how far California cities can go in restricting residents’ newfound freedom to grow cannabis at home.

Under Prop. 64, every Californian 21 or older has a right to cultivate up to six marijuana plants for personal use. But the law also says cities or counties can ban outdoor gardens and “reasonably regulate” indoor grows.

In the seven months since the voter-approved law took affect, a growing number of cities have instituted rules for in-home cultivation that test the limits of what’s considered “reasonable.” But Joy Haviland, staff attorney at the Drug Policy Alliance, said Fontana’s policy was the “most egregious.”

Fontana — a city of 200,000 people that sits 50 miles east of Los Angeles — passed an ordinance in January that requires residents who want to cultivate up to six plants inside their home to first get a $411 permit from the city.

To get a permit, residents have to pay for a background check to prove that they don’t have any drug convictions within the past five years. They can’t have overdue city fees or pending code enforcement violations. Renters have to get a notarized OK from their landlord.

The city ordinance also puts limits on where residents can grow those plants, stating the grow area has to be used exclusively for cultivation, can only be accessed by one locking door, can’t be visible to the public and more. And they have to agree to allow city officials to inspect their homes.

Haviland said these rules make it “unreasonably difficult and expensive” for residents to grow cannabis at home as allowed under Prop. 64, resulting in a “de facto ban” for some people.

“This ordinance is at odds with state law enacted by a majority of the voters in California, in San Bernardino County and the city of Fontana,” she said. “Local officials cannot limit or undo what is now legally allowed in California. Prop. 64 allows adults to cultivate for their own personal use in their private homes without unnecessary intrusion from the state.”

Related: Cities push back against Prop. 64 with strict rules on growing marijuana at home

The lawsuit was filed Monday in San Bernardino County Superior Court on behalf of 61-year-old Mike Harris. He’s a retired iron worker and registered nurse who wants to cultivate marijuana in the Fontana home he’s owned since 1987 to ease his arthritis and pain from old injuries.

Fontana City Attorney Jeff Ballinger said as of Tuesday morning, the city hadn’t yet been served with the lawsuit.

“We can’t really comment until the City Council and city attorneys’ office have had a chance to review the complaint,” he said.

When the City Council passed the ordinance in January, Mayor Acquanetta Warren acknowledged her city’s permitting process isn’t easy — and intentionally so. But she said it’s aimed at protecting all residents.

“This town has been a town of safety. And we’re trying with this initiative to make sure that we keep our residents safe – particularly our young people,” she said.

Related: How to start growing cannabis at home

Can my landlord forbid me from growing pot?

Haviland said those comments from council members, which made it clear that they wanted to pass as restrictive a measure as possible, helped spur the lawsuit against the city.

Another portion of the policy that the Drug Policy Alliance and ACLU object to is that if Fontana residents grow six plants at home without a permit, that’s considered a misdemeanor crime even though it’s legal under state law.

“The ACLU of California supported Prop. 64, in large part because of our longstanding policy that possessing or cultivating marijuana for personal use should not be a crime,” said Jess Farris, director of Criminal Justice at the ACLU of Southern California. “The Fontana ordinance – and other similar ordinances around the state – would criminalize the very conduct Prop. 64 legalized, particularly for people who are ineligible to obtain a permit because of their criminal convictions or their lack of funds to obtain a permit or to dedicate an entire room in their home to cultivation.”

A number of other cities have passed similarly restrictive ordinances on home grows, including Aliso Viejo, Indian Wells, Montebello, Elk Grove, Galt, San Juan Capistrano and San Jacinto.

Some language in several of those policies is identical to what’s found in Fontana’s ordinance. Ballinger confirmed that his law firm, Best Best & Krieger, provided a sample ordinance for cities its attorneys represent — which includes Indian Wells and San Jacinto, among others — to use or tweak as they’d like.

Both Haviland and an ACLU of California spokesman said the suit against Fontana is the first they’re aware of that’s been filed over marijuana rights since Prop. 64 passed on Nov. 8.

Fontana stood out for having the priciest permit, Haviland said. Plus she noted that it’s a much bigger city than, say, Indian Wells, and her organization wants to be smart about pursuing litigation where it stands to have the biggest impact.

“We hope that this lawsuit serves as an example for other cities that have passed or are considering similar ordinances,” she said.

Prop. 64 states that cities have full authority to ban all marijuana-related businesses within their borders — both for medical marijuana businesses now and for recreational cannabis ventures once the state starts handing out licenses for those on Jan. 1.

Fontana and many other cities have enacted full bans on businesses, and Haviland said her organization isn’t challenging that authority. But since many cities are choosing to ban dispensaries and delivery services, she said protecting residents’ right to grow at home becomes even more crucial so they have the access to legal cannabis that’s afforded under state law.

A conference on the Fontana lawsuit is set for Dec. 4., according to San Bernardino County court records.