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:
authorFelipe Artur <felipefac@gmail.com>2019-02-22 17:31:02 +0300
committerFelipe Artur <felipefac@gmail.com>2019-02-25 16:55:15 +0300
commit7e83acb8a2f7fe4a0c0acd6769114e0593c677bb (patch)
tree654589c5de83d9b81f33be720988352ccdcf9a30 /app/controllers/projects/autocomplete_sources_controller.rb
parent4bb06df7771999d13261d0cd05d678d89cba9aba (diff)
Prevent disclosing project milestone titles
Prevent unauthorized users having access to milestone titles through autocomplete endpoint.
Diffstat (limited to 'app/controllers/projects/autocomplete_sources_controller.rb')
-rw-r--r--app/controllers/projects/autocomplete_sources_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/projects/autocomplete_sources_controller.rb b/app/controllers/projects/autocomplete_sources_controller.rb
index 9c130af8394..0e3f13045ce 100644
--- a/app/controllers/projects/autocomplete_sources_controller.rb
+++ b/app/controllers/projects/autocomplete_sources_controller.rb
@@ -1,6 +1,8 @@
# frozen_string_literal: true
class Projects::AutocompleteSourcesController < Projects::ApplicationController
+ before_action :authorize_read_milestone!, only: :milestones
+
def members
render json: ::Projects::ParticipantsService.new(@project, current_user).execute(target)
end