diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-03-01 15:59:19 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-03-01 15:59:19 +0300 |
commit | 814d853a1af2a06bc19ecf60d78ef8fd99b3f682 (patch) | |
tree | 8c8bcfe0be16f9e92a7de3274a700e608138c1d8 /app/controllers/ci | |
parent | 3292940745653a76dadd169a203619c5dfeebd4e (diff) |
Fix deprecated CI build status badge permissions
Diffstat (limited to 'app/controllers/ci')
-rw-r--r-- | app/controllers/ci/projects_controller.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/ci/projects_controller.rb b/app/controllers/ci/projects_controller.rb index d1824b481d7..471cebc82f6 100644 --- a/app/controllers/ci/projects_controller.rb +++ b/app/controllers/ci/projects_controller.rb @@ -3,6 +3,7 @@ module Ci before_action :project before_action :authorize_read_project!, except: [:badge] before_action :no_cache, only: [:badge] + skip_before_action :authenticate_user!, only: [:badge] protect_from_forgery def show @@ -18,6 +19,8 @@ module Ci # def badge return render_404 unless @project + authenticate_user! unless @project.public? + image = Ci::ImageForBuildService.new.execute(@project, params) send_file image.path, filename: image.name, disposition: 'inline', type:"image/svg+xml" end |