Commit Graph

37 Commits

Author SHA1 Message Date
Oswaldo Ferreira 44e1915d4f 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.
2019-06-17 11:25:40 -03:00
gfyoung 93a44e135b Add some frozen string to spec/**/*.rb
Adds frozen string to the following:

* spec/bin/**/*.rb
* spec/config/**/*.rb
* spec/controllers/**/*.rb

xref https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-04-15 10:17:05 +00:00
Rémy Coutable 3a2abc1d50
Enable the Layout/ExtraSpacing cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-01-24 13:05:45 +01:00
Tim Zallmann 2d057da183 Turned cache_privately? into cache_publicly?
Also removed unnecessary comment
2019-01-22 12:34:11 +01:00
Tim Zallmann 86cda964cf Fixed static analysis error and 2 caching specs 2019-01-21 23:58:54 +01:00
Tim Zallmann 5fc63a1d23 Changed the Caching of User Avatars to be public and to 5 minutes 2019-01-21 22:25:54 +01:00
blackst0ne b44a2c801a Update specs to rails5 format
Updates specs to use new rails5 format.

The old format:
`get :show, { some: params }, { some: headers }`

The new format:
`get :show, params: { some: params }, headers: { some: headers }`
2018-12-19 10:04:31 +11:00
Jasper Maes 56296f1eda Remove rails4 specific code 2018-12-16 10:48:41 +01:00
James Lopez 0b93f8cdde
Fix spec for Rails 5 2018-10-23 16:22:23 +02:00
James Lopez 782badd0a2
Fix content caching for non auth users 2018-10-23 16:22:12 +02:00
Mark Chao a63bce1a4b Resolve "Rename the `Master` role to `Maintainer`" Backend 2018-07-11 14:36:08 +00:00
Douwe Maan 5fc3b8a08d
Remove FaviconUploader favicon_main version
See https://gitlab.com/gitlab-org/gitlab-ce/issues/47677 for more information
2018-06-15 12:28:23 +02:00
Rémy Coutable 0f90c1fd73
Don't use Rails.root.join for upload fixture paths
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-06-11 13:54:25 +02:00
Rémy Coutable 7d3bbeeb31 Merge branch 'rs-update-rspec' into 'master'
Update rspec to 3.7

See merge request gitlab-org/gitlab-ce!19449
2018-06-11 09:59:25 +00:00
Robert Speicher 6d165c740c Make all uses of `fixture_file_upload` use relative paths 2018-06-07 09:54:41 -05:00
Alexis Reigel 96d0b1c67b
require uploaded file's name to match in any case 2018-06-05 16:20:23 +02:00
Alexis Reigel 256d959729
ability to get an image's alternative version 2018-06-05 16:20:23 +02:00
Micaël Bergeron 2057a6acde port of 594e6a0a625^..f74c90f68c6 2018-02-01 12:14:46 -05:00
blackst0ne 27c95364b5 Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
Jacopo 2f40dac352 Refactor `have_http_status` into `have_gitlab_http_status` in the specs 2017-10-20 10:13:18 +02:00
Bob Van Landuyt 180de2d201 Make sure uploads for personal snippets are correctly rendered 2017-08-11 18:15:02 +02:00
Robert Speicher 72a7b30c9f Change all `:empty_project` to `:project` 2017-08-02 17:47:31 -04:00
Sean McGivern 88df076fae Merge branch '33359-pers-snippet-files-location' into 'security-9-3'
Use uploads/system directory for personal snippets

See merge request !2123
2017-07-19 22:28:27 -05:00
Jarka Kadlecova 2e311d9d1a Support uploads for newly created personal snippets 2017-06-07 07:52:41 +02:00
Alexis Reigel 9a15b11237 Fixes the 500 for custom apearance header logo and logo 2017-05-19 09:20:51 +00:00
Jarka Kadlecova 43ff738641 Support uploaders for personal snippets comments 2017-05-02 15:22:24 +02:00
Pawel Chojnacki f7cd5fd79a Ensure mutable uploads are not cached without revalidation 2017-02-22 20:34:23 +01:00
Robert Speicher dd944bf14f Merge branch 'svg-xss-fix' into 'security'
Fix for XSS vulnerability in SVG attachments

See https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2059
2017-02-15 10:42:13 -05:00
Robert Speicher 4642ca6686 Use `empty_project` where possible in controller specs 2017-01-25 17:14:38 -05:00
Z.J. van de Weg abca19da8b Use HTTP matchers if possible 2016-06-27 20:10:42 +02:00
Douwe Maan 19aa20d528 Fix more specs 2016-03-20 23:09:33 +01:00
Douwe Maan 8db1292139 Tweaks, refactoring, and specs 2016-03-20 21:04:07 +01:00
Felipe Artur 8b830b8c3b Fix specs 2016-03-18 21:04:53 -03:00
Rémy Coutable 1714883107 Revert "Merge branch 'avatar-cropping' into 'master' "
This reverts commit 01160fc061, reversing
changes made to 4bff9daf8b.
2016-03-15 14:55:40 +01:00
Robert Speicher 93e6282657 Add `:with_avatar` trait to User factory 2016-02-24 13:50:03 -05:00
Valery Sizov b7431ec042 Make all group public 2015-09-09 11:27:03 +03:00
Douwe Maan f5e42f602f Reject access to group/project avatar if the user doesn't have access. 2015-03-10 17:13:02 +01:00