diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-06-04 20:50:57 -0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-06-17 11:25:40 -0300 |
commit | 44e1915d4f0e20cf445196ccc7e1d279c75ef0ce (patch) | |
tree | 2619dcea9bf96af77023f8fb9a0b84cd5a8f69ee /app/controllers/snippets_controller.rb | |
parent | e398409a74db7f3ca1c90d3b056b3a84ebb1b6cf (diff) | |
download | gitlab-ce-44e1915d4f0e20cf445196ccc7e1d279c75ef0ce.tar.gz |
Persist tmp snippet uploads
It persist temporary personal snippets under
user/:id namespaces temporarily while creating
a upload record to track it. If an user gets removed
while it's still a tmp upload, it also gets removed.
If the tmp upload is sent, the upload gets moved to
personal_snippets/:id as before. The upload record
also gets updated to the new model type as well.
Diffstat (limited to 'app/controllers/snippets_controller.rb')
-rw-r--r-- | app/controllers/snippets_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb index 8ea5450b4e8..fad036b8df8 100644 --- a/app/controllers/snippets_controller.rb +++ b/app/controllers/snippets_controller.rb @@ -137,7 +137,7 @@ class SnippetsController < ApplicationController def move_temporary_files params[:files].each do |file| - FileMover.new(file, @snippet).execute + FileMover.new(file, from_model: current_user, to_model: @snippet).execute end end end |