Legislation will restrict press freedom