summaryrefslogtreecommitdiff
path: root/app/controllers/groups/labels_controller.rb
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-11 14:46:07 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-19 14:58:26 -0200
commit36fee24c80afa1e1c5f55cd5f5e5f45a60531d8e (patch)
treee90b6b4b98435bd28be41332bf57fddb8d416300 /app/controllers/groups/labels_controller.rb
parent504682db9e2dd99fe827940ac18d5ea8030ae49c (diff)
downloadgitlab-ce-36fee24c80afa1e1c5f55cd5f5e5f45a60531d8e.tar.gz
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