Again, sir, there is an authority under the Criminal Code where the police have a reasonable apprehension, an honest belief, reasonable, probable grounds to believe that a breach of the peace is about to take place and that it is necessary to detain persons to prevent that breach. There is an authority to do that. That authority only lasts as long as the threat exists and in any event cannot exceed 24 hours. That's an authority under the Criminal Code.
There are also other common law authorities, which of course being common law are not articulated in the code. The police have a duty to maintain the public peace, a duty to prevent crime, and where that duty exists, then a commensurate authority should also exist.