diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-01-03 15:45:49 +0000 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2017-01-05 15:34:50 -0200 |
commit | 30522bf491fde73b42fdb1958b80477cef492b05 (patch) | |
tree | a6906f14eb40591ddb3aff79dece47a008705122 /app | |
parent | cc17568c6d66a34fecdb641f85f977477858f3d6 (diff) | |
download | gitlab-ce-30522bf491fde73b42fdb1958b80477cef492b05.tar.gz |
Merge branch 'project-avatar-fork' into 'master'
Copy, don't move uploaded avatar files
Closes #26158
See merge request !8396
Diffstat (limited to 'app')
-rw-r--r-- | app/uploaders/avatar_uploader.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/uploaders/avatar_uploader.rb b/app/uploaders/avatar_uploader.rb index a1ecb7bc00b..265cea2d2c6 100644 --- a/app/uploaders/avatar_uploader.rb +++ b/app/uploaders/avatar_uploader.rb @@ -10,4 +10,15 @@ class AvatarUploader < GitlabUploader def exists? model.avatar.file && model.avatar.file.exists? end + + # We set move_to_store and move_to_cache to 'false' to prevent stealing + # the avatar file from a project when forking it. + # https://gitlab.com/gitlab-org/gitlab-ce/issues/26158 + def move_to_store + false + end + + def move_to_cache + false + end end |