From 36fee24c80afa1e1c5f55cd5f5e5f45a60531d8e Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Tue, 11 Oct 2016 14:46:07 -0300 Subject: [PATCH] Limit what label fields we expose on Groups::LabelsController#index --- app/controllers/groups/labels_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/groups/labels_controller.rb b/app/controllers/groups/labels_controller.rb index 483a5aedf12..0a3dee5ce39 100644 --- a/app/controllers/groups/labels_controller.rb +++ b/app/controllers/groups/labels_controller.rb @@ -14,7 +14,8 @@ class Groups::LabelsController < Groups::ApplicationController end format.json do - render json: LabelsFinder.new(current_user, group_id: @group.id).execute + available_labels = LabelsFinder.new(current_user, group_id: @group.id).execute + render json: available_labels.as_json(only: [:id, :title, :color]) end end end