Commit Graph

1479 Commits

Author SHA1 Message Date
Rémy Coutable 467b44cbbf Merge branch 'api-branch-status' into 'master'
API: Expose branch status

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/24938

See merge request !7796
2016-11-30 17:40:39 +00:00
Rémy Coutable 2c0d9890e6 Merge branch 'grapify-files-api' into 'master'
Grapify the files API

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/22928

See merge request !7806
2016-11-30 15:10:56 +00:00
Robert Schilling 2ce66c071f API: Expose branch status 2016-11-30 13:13:50 +01:00
Robert Schilling dd5f71138c Grapify the files API 2016-11-30 12:48:10 +01:00
Rémy Coutable 43c8788e7b Merge branch 'grapify-projects-api' into 'master'
Grapify the projects API

Related to #22928 

See merge request !7456
2016-11-30 11:32:32 +00:00
Grzegorz Bizon a49e9949c6 Rename `MergeRequest#pipeline` to `head_pipeline` 2016-11-29 14:12:49 +01:00
Douwe Maan 3bf34face4 Merge branch 'jej-use-issuable-finder-instead-of-access-check' into 'security'
Replace issue access checks with use of IssuableFinder

Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867

## Which fixes are in this MR?

⚠️ - Potentially untested  
💣 - No test coverage  
🚥 - Test coverage of some sort exists (a test failed when error raised)  
🚦 - Test coverage of return value (a test failed when nil used)  
 - Permissions check tested

### Issue lookup with access check

Using `visible_to_user` likely makes these security issues too. See [Code smells](#code-smells).

- [x] 🚦 app/finders/notes_finder.rb:15 [`visible_to_user`]
- [x] 🚥 app/views/layouts/nav/_project.html.haml:73 [`visible_to_user`] [`.count`]
- [x]  app/services/merge_requests/build_service.rb:84 [`issue.try(:confidential?)`]
- [x]  lib/api/issues.rb:112 [`visible_to_user`]
  - CHANGELOG: Prevented API returning issues set to 'Only team members' to everyone
- [x]  lib/api/helpers.rb:126 [`can?(current_user, :read_issue, issue)`] Maybe here too?
- [x]  lib/gitlab/search_results.rb:53 [`visible_to_user`]

### Previous discussions
- [ ] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#b2ff264eddf9819d7693c14ae213d941494fe2b3_128_126
- [ ] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#7b6375270d22f880bdcb085e47b519b426a5c6c7_87_87

See merge request !2031
2016-11-28 21:26:23 -03:00
Douwe Maan 3d7704ae5f Merge branch 'zj-fix-label-creation-non-members' into 'security'
Fix label creation non members

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23416

See merge request !2006
2016-11-28 21:24:19 -03:00
Robert Schilling 7c607a55ab Grapify the projects API 2016-11-28 21:01:43 +01:00
Rémy Coutable e17328986a Merge branch 'zj-expose-coverage-pipelines' into 'master'
Expose coverage on GET pipelines/:id

Closes gitlab-org/gitlab-ce#24801

See merge request !7670
2016-11-25 16:51:53 +00:00
Z.J. van de Weg 40e8185b64 Expose coverage on GET pipelines/:id
The coverage wasn't exposed yet, now it is but only for detailed
requests to save queries on the database.
2016-11-25 15:49:59 +01:00
Yorick Peterse 838c1aad68 Merge branch '22373-reduce-queries-in-api-helpers-find_project' into 'master'
Resolve "Reduce queries in API::Helpers#find_project"

See merge request !7714
2016-11-25 12:17:23 +00:00
Rémy Coutable 81ba3f9177
API: Introduce `#find_group!` which also check access permission
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-24 16:58:32 +01:00
Rémy Coutable 4f5ed81232
API: Introduce `#find_project!` which also check access permission
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-24 14:40:35 +01:00
Robert Schilling 9dfbfbb2d1 Don't convert data which already is the target type 2016-11-24 13:35:26 +01:00
Rémy Coutable 304163becb
API: Use `#find_project` in API::Triggers and API::Services
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-24 13:22:38 +01:00
Rémy Coutable 4d2e7894ef
Make API::Helpers find a project with only one query
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-24 10:19:36 +01:00
Rémy Coutable 010790ee39 Merge branch 'api-delete-group-share' into 'master'
API: Add endpoint to delete a group share

Closes #24771

See merge request !7662
2016-11-23 15:17:59 +00:00
Rémy Coutable 2317eb5ec9 Merge branch 'grapify-sidekiq-metric-api' into 'master'
Grapify the sidekiq metrics API

Related to #22928

See merge request !7699
2016-11-23 15:06:29 +00:00
Robert Schilling d2985eb572 Grapify the sidekiq metrics API 2016-11-23 13:36:52 +01:00
Robert Schilling eff1b05ab1 API: Add endpoint to delete a group share 2016-11-23 12:53:37 +01:00
Valery Sizov 3789cfe056 Add a starting date to milestones 2016-11-23 13:41:04 +02:00
Rémy Coutable 7902395f1f Merge branch 'fix-api-iid-filter' into 'master'
Fix IID filter for merge requests and milestones

I updated the example in the docs and added a test. The milestones API was also broken for the same reason.

Related to !7358 and !7373

See merge request !7648
2016-11-22 16:16:43 +00:00
Rémy Coutable 79030a0e12 Merge branch '23532-define-common-helper-for-describe-pagination-params-in-api' into 'master'
Add concern for reuse pagination params declaration in API

Closes #23532

See merge request !7646
2016-11-22 15:33:57 +00:00
Robert Schilling 9e608b41a1 Avoid helper call with default parameters 2016-11-22 11:26:29 +01:00
Robert Schilling cb11d3521c Fix IID filter for merge requests and milestones 2016-11-22 08:25:07 +01:00
Robert Speicher e76c195ebd Merge branch '24730-broken-master' into 'master'
Fix StrongAttibutes error with Ruby 2.1

Closes #24730

See merge request !7625
2016-11-22 05:54:24 +00:00
Semyon Pupkov 77cf855bb9 Define common helper for describe pagination params in api 2016-11-22 09:19:26 +05:00
Rémy Coutable 039d4a1cbf
Fix StrongAttibutes error with Ruby 2.1
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-21 18:47:55 +01:00
Robert Schilling b7bf1f3a9d Grapify the projects snippet API 2016-11-21 17:25:34 +01:00
Rémy Coutable 0be557331d Merge branch 'grapify-users-api' into 'master'
Grapify the users API

Certain endpoints return different entities based on which user issues the request. Right now, I am not aware how to specify multiple entities as part of the description block of the endpoint. @rymai Do you know something about that.

## What are the relevant issue numbers?

Related to #22928

See merge request !7147
2016-11-21 12:37:20 +00:00
Rémy Coutable c99522f21e Merge branch 'create-pipeline-endpoint' into 'master'
Add API endpoint for creating a pipeline

Fixes #23468

See merge request !7209
2016-11-21 11:30:23 +00:00
Robert Schilling 4cb3c0b404 Grapify the users API 2016-11-21 10:53:28 +01:00
Ido Leibovich fbfc7523cb Add api endpoint for creating a pipeline
Add a new endpoint in the new API for creating a new pipeline, and return the details of that pipeline.
2016-11-18 23:12:21 +02:00
Kamil Trzciński ffc5fc6a38 Merge branch 'zj-slash-commands-mattermost' into 'master'
Slash command for mattermost

Closes  #22540

## Does this MR meet the acceptance criteria?

- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)


See merge request !7438
2016-11-18 18:06:36 +00:00
Z.J. van de Weg dd826a5f20 Return a consistent not found message
This prevents leakage of project names on an endpoint which is
unauthenticated and thus open to the world.
2016-11-18 12:30:32 +01:00
Rémy Coutable 688ff26df3 Merge branch 'grapify-repository-api' into 'master'
Grapify repository api

See merge request !7534
2016-11-18 11:09:49 +00:00
Z.J. van de Weg f749fb7fe0 Improve style, add more tests 2016-11-18 11:38:54 +01:00
Robert Schilling e971009923 Grapify the repository API 2016-11-18 10:43:31 +01:00
Z.J. van de Weg 0d04724fa1 More coverage on service level 2016-11-18 10:00:40 +01:00
Sean McGivern 8823107e57 Merge branch 'sort-api-groups' into 'master'
Allow sorting groups in API

Relates to #20013.

See merge request !7529
2016-11-17 21:50:02 +00:00
Z.J. van de Weg 778b5a5a04 Merge remote-tracking branch 'origin/master' into zj-slash-commands-mattermost 2016-11-17 21:56:38 +01:00
Z.J. van de Weg 166ee0965b More refactoring, push present to base command 2016-11-17 21:44:26 +01:00
Z.J. van de Weg d4def9cbcd Incorporate feedback, improve presenter class
[ci skip]
2016-11-17 21:34:24 +01:00
Kamil Trzcinski 53271b486d Make chat authorization to work [ci skip] 2016-11-17 21:34:23 +01:00
Sean McGivern 7912289631 Allow sorting groups in API
Allow `order_by` and `sort` parameters to `/api/v3/groups.json`. At
present, only ordering by name and path is supported, and the default
sort is name ascending (alphabetical order).
2016-11-17 18:37:52 +00:00
Douglas Barbosa Alexandre 0c052f116c Remove default value for `project` argument on subscribable concern 2016-11-17 15:10:13 -02:00
Douglas Barbosa Alexandre b34c063ec4 Pass project to Entities::Label to check if user is subscribed 2016-11-17 15:10:13 -02:00
Sean McGivern f9616f1529 Merge branch '24496-fix-internal-api-project-lookup' into 'master'
Fix POST /internal/allowed to cope with gitlab-shell v4.0.0 project paths

Closes #24496

See merge request !7480
2016-11-16 20:49:30 +00:00
Douwe Maan 4e63411daa Merge branch 'adam-build-missing-services-when-necessary' into 'master'
Defer saving project services to the database if there are no user changes

## What does this MR do?

It defers saving project services to the database as long as it is possible. It creates a project service when creating a project only if this project service has an active template. After that project services are saved on the first edit.

## Are there points in the code the reviewer needs to double check?

- tests that used `build_missing_services` before the change
- number of queries executed

## Why was this MR needed?

Motivation in #22281

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

Fixes #22281

See merge request !6958
2016-11-16 16:27:54 +00:00