Commit Graph

36 Commits

Author SHA1 Message Date
GitLab Bot d3fc3be040 Add latest changes from gitlab-org/gitlab@master 2020-03-04 15:08:09 +00:00
GitLab Bot 7b52c7cb63 Add latest changes from gitlab-org/gitlab@master 2020-03-02 18:07:42 +00:00
GitLab Bot 1c8fa70f9d Add latest changes from gitlab-org/gitlab@master 2020-02-28 18:09:07 +00:00
GitLab Bot b304a72312 Add latest changes from gitlab-org/gitlab@master 2020-02-17 15:09:01 +00:00
GitLab Bot 536aa3a1f4 Add latest changes from gitlab-org/gitlab@master 2020-01-30 15:09:15 +00:00
GitLab Bot e723867717 Add latest changes from gitlab-org/gitlab@master 2019-12-17 18:07:48 +00:00
GitLab Bot d10a462fed Add latest changes from gitlab-org/gitlab@master 2019-12-16 12:07:43 +00:00
GitLab Bot 8e75748aab Add latest changes from gitlab-org/gitlab@master 2019-11-22 06:06:20 +00:00
GitLab Bot abfafe3c57 Add latest changes from gitlab-org/gitlab@master 2019-10-29 00:06:10 +00:00
GitLab Bot 7bb7a8d529 Add latest changes from gitlab-org/gitlab@master 2019-09-25 03:06:21 +00:00
Grzegorz Bizon 1068ec2e92 Merge branch '66741-remove-spec-rails_helper-rb' into 'master'
Remove spec/rails_helper.rb

Closes #66741

See merge request gitlab-org/gitlab-ce!32380
2019-09-03 13:48:17 +00:00
Ash McKenzie 19ff9d9899
Replace rails_helper.rb with spec_helper.rb
rails_helper.rb's only logic was to require
spec_helper.rb.
2019-08-30 12:26:18 +10:00
Stan Hu 680f437715 Fix snippets API not working with visibility level
When a restricted visibility level of `private` is set in the instance,
creating a snippet with the `visibility` level would always fail.
This happened because:

1. `params[:visibility]` was a string (e.g. "public")
2. `CreateSnippetService` and `UpdateSnippetService` only looked
   at `params[:visibility_level]`, which was `nil`.

To fix this, we:

1. Make `CreateSnippetService` look at the newly-built
   `snippet.visibility_level`, since the right value is assigned by the
   `VisibilityLevel#visibility=` method.
2. Modify `UpdateSnippetService` to handle both `visibility_level` and
`visibility` parameters.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66050
2019-08-28 22:49:58 -07:00
Nick Thomas e05a86cecd
Allow all personal snippets to be accessed by API
Previously, you could only access personal snippets in the API if you
had authored them. The documentation doesn't state that this is the
case, and it's quite surprising.
2019-03-06 09:05:03 +00: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
Francisco Javier López 9a5703ec82 Set content disposition attachment to several endpoints 2018-11-23 16:44:09 +00:00
Robert Speicher c9ecf49d8c
Correct "autorize" typos 2018-06-27 15:16:18 -05:00
Jan 4077d4f735 Resolve "Provide ability to retrieve `visibility` level via Snippets API" 2018-06-13 10:28:27 +00:00
Douwe Maan 5e9e56924a Merge branch 'security-10-4-25223-snippets-finder-doesnt-obey-feature-visibility' into 'security-10-4'
[Port for security-10-4]: Makes SnippetFinder ensure feature visibility
2018-02-09 12:04:05 -06:00
Jacopo 2f40dac352 Refactor `have_http_status` into `have_gitlab_http_status` in the specs 2017-10-20 10:13:18 +02:00
Sean McGivern f11049ab91 Merge branch 'api-delete-respect-headers' into 'master'
API: Respect the 'If-Unmodified-Since' for delete endpoints

See merge request !9621
2017-08-30 09:56:17 +00:00
Maxim Rydkin fa030cbc85 replace `is_spam?` with `spam?` 2017-08-29 11:14:42 +03:00
Robert Schilling 915dd57fe2 Add tests for the unmodified header 2017-08-28 17:10:34 +02:00
Rémy Coutable c946ee1282
Enable the Layout/SpaceBeforeBlockBraces cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-09 11:52:22 +02:00
James Lopez 2aa95aa018 refactor code based on feedback 2017-07-06 15:27:49 +02:00
James Lopez 5540425ad3 fix spec 2017-07-06 15:27:48 +02:00
James Lopez e0345c8da1 add snippets spec 2017-07-06 15:27:48 +02:00
Grzegorz Bizon 0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
Jarka Kadlecova 4464c22d6d Support descriptions for snippets 2017-05-31 07:17:03 +02:00
Jacopo ff76adb547 Unnecessary "include WaitForAjax" and "include ApiHelpers"
Removed all the unnecessary include of `WaitForAjax` and `ApiHelpers` in the specs.
Removed unnecessary usage of `api:true`
2017-04-21 22:32:02 +02:00
Toon Claes 209856166e Expose Snippet VisibilityLevel as String 2017-03-02 12:15:24 +01:00
Robert Schilling 86c58687b2 Return 204 for delete endpoints 2017-02-28 08:32:38 +01:00
Oswaldo Ferreira 2ace39f242 Spam check and reCAPTCHA improvements 2017-02-21 13:32:49 -03:00
Robert Schilling c70dfbc686 Add a custom pagination matcher 2017-02-16 15:38:40 +01:00
Sean McGivern c63194ce6f Check public snippets for spam
Apply the same spam checks to public snippets (either personal snippets
that are public, or public snippets on public projects) as to issues on
public projects.
2017-02-02 10:23:51 +00:00
Guyzmo fde754e267 API: Endpoint to expose personal snippets as /snippets
Adding the necessary API for the new /snippets Restful resource
added with this commit. Added a new Grape class `Snippets`, as
well as a `PersonalSnippet` entity.

Issue: #20042
Merge-Request: !6373
Signed-off-by: Guyzmo <guyzmo+gitlab+pub@m0g.net>
2016-12-01 19:07:49 +01:00