Julia Kretzenbacher is a barrister and the President of Liberty Victoria. She said yes, it's legal, as long as it's based on health advice.
"The Chief Health Officer and the Victorian Public Health and Wellbeing Act has quite broad powers in an emergency to issue directions that relate to public health. So there is a legal basis for those directions to be made," she said.
It's also something to keep in mind when pubs and restaurants start opening up over the next few weeks and months.