From fecc3ad6046cc838e7ddf7de5acf5e00969b9d49 Mon Sep 17 00:00:00 2001 From: Kristian Garza Date: Fri, 3 May 2019 10:59:12 +0200 Subject: [PATCH] remove password from csv export --- .gitignore | 3 ++- app/controllers/providers_controller.rb | 2 +- app/models/provider.rb | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index ac2cc5770..774725973 100644 --- a/.gitignore +++ b/.gitignore @@ -52,4 +52,5 @@ doc/dependencies* !.env.example !.env.travis docker-compose.override.yml -.ruby-version \ No newline at end of file +.ruby-version +.vscode \ No newline at end of file diff --git a/app/controllers/providers_controller.rb b/app/controllers/providers_controller.rb index b87f461d1..152207988 100644 --- a/app/controllers/providers_controller.rb +++ b/app/controllers/providers_controller.rb @@ -70,7 +70,7 @@ def index } render json: ProviderSerializer.new(@providers, options).serialized_json, status: :ok end - header = %w(name provider_id year contact_name contact_address is_active description website region country_code logo_url focus_area organisation_type memmber_type address, post_code, city, state, twitter_handle, ror_id, role_name password joined created updated deleted_at) + header = %w(name provider_id year contact_name contact_address is_active description website region country_code logo_url focus_area organisation_type memmber_type address post_code city state twitter_handle ror_id role_name joined created updated deleted_at) format.csv { render request.format.to_sym => response.records.to_a, header: header } end rescue Elasticsearch::Transport::Transport::Errors::BadRequest => exception diff --git a/app/models/provider.rb b/app/models/provider.rb index 7f1f329b1..0bb4364d6 100644 --- a/app/models/provider.rb +++ b/app/models/provider.rb @@ -183,7 +183,6 @@ def csv twitter_handle: twitter_handle, ror_id: ror_id, role_name: role_name, - password: password, joined: joined, created: created, updated: updated,