diff options
author | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-02-17 18:05:12 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-02-17 18:05:12 +0000 |
commit | 55a906f643b5d52722597f18f2f8e417e92dab6b (patch) | |
tree | c39e61b76900d716de19531c8a0be2e980b9209f /db | |
parent | 112db32f1963b4b85ca728a446f3e26438ff7603 (diff) | |
parent | ebd39fc082b09177e0777e5de5729c3f98495e87 (diff) | |
download | gitlab-ce-55a906f643b5d52722597f18f2f8e417e92dab6b.tar.gz |
Merge branch 'fix_access_control_notes' into 'master'
Fix broken access control for note attachments
From https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/332 by Hannes Rosenögger.
See merge request !1528
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20150213111727_move_note_folder.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20150213111727_move_note_folder.rb b/db/migrate/20150213111727_move_note_folder.rb new file mode 100644 index 00000000000..ca7f87d984f --- /dev/null +++ b/db/migrate/20150213111727_move_note_folder.rb @@ -0,0 +1,19 @@ +class MoveNoteFolder < ActiveRecord::Migration + def up + system( + "if [ -d '#{Rails.root}/public/uploads/note' ]; + then mv #{Rails.root}/public/uploads/note #{Rails.root}/uploads/note; + echo 'note folder has been moved successfully'; + else + echo 'note folder has already been moved or does not exist yet. Nothing to do here.'; fi") + end + + def down + system( + "if [ -d '#{Rails.root}/uploads/note' ]; + then mv #{Rails.root}/uploads/note #{Rails.root}/public/uploads/note; + echo 'note folder has been moved successfully'; + else + echo 'note folder has already been moved or does not exist yet. Nothing to do here.'; fi") + end +end |