Legislation to undo the 2018 ban will be introduced to Parliament later this year.