diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-19 08:57:35 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-19 08:57:35 -0800 |
commit | 8184a6564454faf0f9ae9dfee1377c3407d08447 (patch) | |
tree | 0858476b0f6292ee1069c223283d8bc2cb932fc9 /app/controllers/files_controller.rb | |
parent | 7c3147e6e969a7ae97e2f8d05e536abeeb7d3936 (diff) | |
download | gitlab-ce-8184a6564454faf0f9ae9dfee1377c3407d08447.tar.gz |
Revert "Fix broken access control and refactor avatar upload"
This reverts commit 7d5f86f6cbd187e75a6ba164ad6bfd036977dd07.
Diffstat (limited to 'app/controllers/files_controller.rb')
-rw-r--r-- | app/controllers/files_controller.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 561af8084c3..9671245d3f4 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -6,9 +6,7 @@ class FilesController < ApplicationController if uploader.file_storage? if can?(current_user, :read_project, note.project) disposition = uploader.image? ? 'inline' : 'attachment' - # Replace old notes location in /public with the new one in / and send the file - path = uploader.file.path.gsub("#{Rails.root}/public",Rails.root.to_s) - send_file path, disposition: disposition + send_file uploader.file.path, disposition: disposition else not_found! end |