The bylaws were passed by the city in 2006 and then amended after the protesters had them struck down by the courts.
On Thursday Justice Gregory Bowden ruled that the amended bylaws are constitutional because they applied only to structures and did not restrict other forms of protest or political expression.
"While the amended bylaws will preclude the petitioners and others from permanently erecting politically expressive structures on city streets, they remain free to convey their message at any location they choose and in a manner that does not involve the use of a permanent structure," wrote Bowden in his ruling.
The original structure was set up on public property in 2001 to provide shelter for meditating protesters. It was later removed under the current by-law in 2009.