Added 'permit_user_environment' parameter.