Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-11 20:46:07 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-19 19:58:26 +0300
commit36fee24c80afa1e1c5f55cd5f5e5f45a60531d8e (patch)
treee90b6b4b98435bd28be41332bf57fddb8d416300 /app/controllers/groups/labels_controller.rb
parent504682db9e2dd99fe827940ac18d5ea8030ae49c (diff)
Limit what label fields we expose on Groups::LabelsController#index
Diffstat (limited to 'app/controllers/groups/labels_controller.rb')
-rw-r--r--app/controllers/groups/labels_controller.rb3
1 files changed, 2 insertions, 1 deletions
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