Police will be able to issue immediate 12-month protections to alleged victims after legislation passed state parliament.