Protesters have successfully challenged a declaration that gave police the power to search people without a warrant.