Commit Graph

86 Commits

Author SHA1 Message Date
Grzegorz Bizon 1bcb1ef85e Update specs for creating new note without access 2016-05-29 15:03:00 -04:00
Felipe Artur c9be74e247 Fix single note api request 2016-05-16 16:43:19 -03:00
Felipe Artur 93ca5c9964 Fix notes API calls symbol convertions 2016-05-10 16:06:02 -03:00
Felipe Artur e56e3cdc62 Fix api leaking notes when user is not authorized to read noteable 2016-05-09 19:35:37 -03:00
Robert Speicher be67a4843c Prevent privilege escalation via notes API
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15577
2016-04-26 14:40:51 -04:00
Michael Greene c1467f5d97 Allow back dating notes on creation 2016-04-13 12:04:09 -05:00
Robert Schilling dc39c8372d Adapt tests to new testing guidelines 2016-04-12 15:43:29 +02:00
Robert Schilling 9aefaa41ab Fix code review issues 2016-04-12 14:24:05 +02:00
Robert Schilling ba21c00f01 Delete notes via API 2016-04-12 14:24:05 +02:00
Rémy Coutable 3183092ca9 Add pagination headers to already paginated API resources 2016-01-14 12:10:27 +01:00
Rémy Coutable e918493f55 Fix specs and rubocop warnings 2016-01-14 10:04:48 +01:00
Rémy Coutable 0c10aee596 Ensure the API doesn't return notes that the current user shouldn't see 2016-01-13 19:42:36 +01:00
Jeroen van Baarsen 0c4a70a306 Updated rspec to rspec 3.x syntax
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-02-12 19:17:35 +01:00
uran 1fbc010241 Implemented notes (body) patching in API. 2014-12-25 14:28:40 +02:00
Dmitriy Zaporozhets 2d87556847 Remove rails observers from application 2014-06-17 22:51:43 +03:00
Dmitriy Zaporozhets 8ff171f628
Fix api specs
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-13 19:39:12 +03:00
Dmitriy Zaporozhets d593c98fcb
Delete wall notes tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-13 14:29:26 +03:00
Jeroen van Baarsen 5dd2f36ae1 Added API testing group 2014-04-11 21:45:56 +02:00
Angus MacArthur aefe2e952f Fixing unsafe use of Thread.current variable :current_user 2013-10-16 01:20:53 -04:00
Hiroyuki Sato a3ef683108 Drop support of root namespace in model 2013-09-17 23:05:42 +09:00
Izaak Alpert 3d7194f011 Merge Request on forked projects
The good:

 - You can do a merge request for a forked commit and it will merge properly (i.e. it does work).
 - Push events take into account merge requests on forked projects
 - Tests around merge_actions now present, spinach, and other rspec tests
 - Satellites now clean themselves up rather then recreate

The questionable:

 - Events only know about target projects
 - Project's merge requests only hold on to MR's where they are the target
 - All operations performed in the satellite

The bad:

  -  Duplication between project's repositories and satellites (e.g. commits_between)

(for reference: http://feedback.gitlab.com/forums/176466-general/suggestions/3456722-merge-requests-between-projects-repos)

Fixes:

Make test repos/satellites only create when needed
-Spinach/Rspec now only initialize test directory, and setup stubs (things that are relatively cheap)
-project_with_code, source_project_with_code, and target_project_with_code now create/destroy their repos individually
-fixed remote removal
-How to merge renders properly
-Update emails to show project/branches
-Edit MR doesn't set target branch
-Fix some failures on editing/creating merge requests, added a test
-Added back a test around merge request observer
-Clean up project_transfer_spec, Remove duplicate enable/disable observers
-Ensure satellite lock files are cleaned up, Attempted to add some testing around these as well
-Signifant speed ups for tests
-Update formatting ordering in notes_on_merge_requests
-Remove wiki schema update
Fixes for search/search results
-Search results was using by_project for a list of projects, updated this to use in_projects
-updated search results to reference the correct (target) project
-udpated search results to print both sides of the merge request

Change-Id: I19407990a0950945cc95d62089cbcc6262dab1a8
2013-07-17 22:41:30 -04:00
Dmitriy Zaporozhets bcc4e4dc7e Merge branch 'gist' of https://github.com/Andrew8xx8/gitlabhq into Andrew8xx8-gist
Conflicts:
	Gemfile.lock
	app/models/ability.rb
	app/models/project.rb
	app/views/snippets/_form.html.haml
	db/schema.rb
	features/steps/shared/paths.rb
	spec/factories.rb
	spec/models/project_spec.rb
2013-06-04 18:36:22 +03:00
Dmitriy Zaporozhets 634cbd7138 Refactor API classes. So api classes like Gitlab::Issues become API::Issues 2013-05-14 15:33:31 +03:00
Andrew8xx8 d4543eb5a7 Tests fixed 2013-03-25 11:20:14 +04:00
Sebastian Ziebell 3374027e3a Merge branch 'master' into fixes/api, code clean up and tests fixed
Conflicts:
	doc/api/projects.md
	spec/requests/api/projects_spec.rb
2013-03-07 14:51:56 +01:00
Sebastian Ziebell 33c1463645 API: fixes return codes for notes, documentation updated
The notes API documentation updated with return codes. API now returns `400 Bad Request` if
required attributes are not present. Return codes are documented now, also tested in added tests.
The documentation now reflects the current state of the API.
2013-02-20 22:17:05 +01:00
Sebastian Ziebell 8045a81bcf Merge branch 'master' into fixes/api 2013-02-08 10:32:42 +01:00
Sebastian Ziebell bb24275f8d Status code 400 is returned if body is missing on note creation.
If a note is created with a POST request via API (`/projects/:id/notes`) status
code 400 is returned instead of 404. The resource itself exists but the request
is incomplete. Specs added to check different status codes when accessing, creating
and updating notes.
2013-02-06 17:11:00 +01:00
Dmitriy Zaporozhets 9da7b2e8d8 add specs for api -> merge request notes 2013-01-31 08:42:11 +02:00
Dmitriy Zaporozhets afbdbb0c95 Rspec fixes 2013-01-04 18:50:31 +02:00
Dmitriy Zaporozhets d431e43392 Fix few bugs and tests after refactoring ownership logic 2013-01-02 19:32:34 +02:00
Nihad Abbasov 270a43370a API: get a single wall note 2012-12-01 02:20:45 -08:00
Nihad Abbasov ee6187bd55 API: ability to create a wall note 2012-11-29 15:52:56 -08:00
Nihad Abbasov c946bf886c API: create new notes 2012-11-29 12:11:00 -08:00
Nihad Abbasov 1c5aa848ce API: get a single note 2012-11-29 12:11:00 -08:00
Nihad Abbasov 01eab583d0 API: list wall, snippet and issue notes 2012-11-29 12:11:00 -08:00