summaryrefslogtreecommitdiff
path: root/lib/api
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Revert all changes introduced by ↵lfs-supportKamil Trzcinski2016-09-191-0/+13
| | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6043" This reverts commit 6d43c95b7011ec7ec4600e00bdc8df76bb39813c.
* Revert all changes introduced by ↵Kamil Trzcinski2016-09-191-13/+0
| | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6043
* Merge branch 'master' into per-build-tokenKamil Trzcinski2016-09-193-7/+11
|\
| * Fix API notes endpoint when posting only emojiZ.J. van de Weg2016-09-161-4/+4
| |
| * Syntax fixes and better tests for helper methods. Updated docs.group-specific-lfs-settingsPatricio Cano2016-09-151-2/+4
| |
| * Added group-specific setting for LFS.Patricio Cano2016-09-152-3/+5
| | | | | | | | Groups can enable/disable LFS, but this setting can be overridden at the project level. Admin only
* | Rename capabilities to authentication_abilitiesKamil Trzcinski2016-09-161-3/+3
| |
* | Merge remote-tracking branch 'origin/lfs-support-for-ssh' into per-build-tokenKamil Trzcinski2016-09-151-0/+13
|\ \ | | | | | | | | | | | | | | | | | | | | | # Conflicts: # app/controllers/projects/git_http_client_controller.rb # app/helpers/lfs_helper.rb # lib/gitlab/auth.rb # spec/requests/lfs_http_spec.rb
| * | Better authentication handling, syntax fixes and better actor handling for ↵Patricio Cano2016-09-151-8/+1
| | | | | | | | | | | | LFS Tokens
| * | Refactored handling of the `LfsToken` and added functionality to it to ↵Patricio Cano2016-09-151-9/+11
| | | | | | | | | | | | simplify external code.
| * | Refactored LFS auth logic when using SSH to use its own API endpoint ↵Patricio Cano2016-09-151-12/+18
| | | | | | | | | | | | `/lfs_authenticate` and added tests.
| * | Refactor LFS token logic to use a Redis key instead of a DB field, making it ↵Patricio Cano2016-09-152-5/+6
| | | | | | | | | | | | a 1 use only token.
| * | Added LFS support to SSHPatricio Cano2016-09-152-2/+13
| |/ | | | | | | - Required on the GitLab Rails side is mostly authentication and API related.
* | Fix existing authorization specsKamil Trzcinski2016-09-151-10/+8
| |
* | Merge remote-tracking branch 'origin/master' into per-build-tokenKamil Trzcinski2016-09-152-26/+32
|\ \ | |/ | | | | | | # Conflicts: # db/schema.rb
| * Change response for /ci/api/v1/builds/register.json from 404 to 204Tomasz Maczukin2016-09-131-0/+4
| |
| * Fix an error where we were unable to create a CommitStatus for running statefix-commit-statusKamil Trzcinski2016-09-121-26/+28
| |
* | Add access specsKamil Trzcinski2016-09-151-2/+12
|/
* Merge branch 'rc-api-use-search-globalservice-in-projects-search-api' into ↵Rémy Coutable2016-09-121-12/+3
|\ | | | | | | | | | | | | | | 'master' API: Use Search::GlobalService in projects search API See merge request !6280
| * Use Search::GlobalService.new in the `GET /projects/search/:query` endpointrc-api-use-search-globalservice-in-projects-search-apiRémy Coutable2016-09-121-12/+3
| | | | | | | | | | | | | | | | | | | | Also streamline the sorting part while we're at it. That being done, there's currently a duplication between `GET /projects/search/:query` and `GET /projects?search=:search` so we might want to keep only the latter for 9.0... Signed-off-by: Rémy Coutable <remy@rymai.me>
| * Search should compare only the lowercase versions of the project namesRazzeee2016-09-091-1/+1
| |
* | Merge branch 'fix-api-sorting' into 'master' Douwe Maan2016-09-121-3/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix API issues sorting ## What does this MR do? Fix the sorting of issues in the API. ## Are there points in the code the reviewer needs to double check? Instead of removing the '_at' suffix manually, we could add those versions to the `Sortable` concern instead. ## Why was this MR needed? There were a couple of bugs: * The global and project-specific issues endpoints wouldn't sort at all. * Group sorting would work, but only if you applied two undocumented workarounds: * Always pass both `order_by` and `sort` (both are optional, so only one should be needed to change ordering). * Instead of passing `created_at` or `updated_at`, you needed to pass `created` or `updated`. This makes the API implementation match the docs. ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] API support added - Tests - [x] Added for this feature/bug - [ ] 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 you do - 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? Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/983. See merge request !6281
| * | Fix API issues sortingfix-api-sortingSean McGivern2016-09-091-3/+9
| |/
* | Add notification_settings API callsMarc Siegfriedt2016-09-093-1/+114
|/ | | | Use NotificationSetting::EMAIL_EVENTS for params
* Use PipelinesFinder in Pipelines APIZ.J. van de Weg2016-09-071-1/+4
|
* Improve curl commend, remove blank linesKatarzyna Kobierska2016-09-071-2/+0
|
* Fix invalid curl commandKatarzyna Kobierska2016-09-071-4/+5
|
* Add Documentation to Ci Lint APIKatarzyna Kobierska2016-09-071-3/+3
|
* Code refactorKatarzyna Kobierska2016-09-071-1/+1
|
* Improve codeKatarzyna Kobierska2016-09-071-14/+10
|
* Code refactoringKatarzyna Kobierska2016-09-071-25/+18
|
* Fix errors and grammarKatarzyna Kobierska2016-09-071-13/+10
|
* Fix rubocop errorsKatarzyna Kobierska2016-09-071-1/+1
|
* Change class method nameKatarzyna Kobierska2016-09-071-3/+3
|
* Add class method to encapsulate exceptionKatarzyna Kobierska2016-09-071-18/+16
|
* Move lint to api from ci/apiKatarzyna Kobierska2016-09-072-0/+39
|
* Higher code quality for fork to namespace APIOlaf Tomalka2016-09-061-1/+0
|
* Improved code quality on API fork namespace featureOlaf Tomalka2016-09-061-3/+6
|
* Added fork API paremeter for a specific namespaceOlaf Tomalka2016-09-061-2/+14
| | | | | | | | | Browser interface allows forking to an owned grup. This commit brings API up to speed by providing optional namespace parameter to fork API. This allows forking to users and groups under forker's control using their id or unique name. Fixes #21591
* Merge branch 'internal_recovery_api' into 'master' Douwe Maan2016-09-021-5/+9
|\ | | | | | | | | | | | | Minor edits to two_factor_recovery_codes API error catching Minor fixes to the `two_factor_recovery_codes` internal API making the conditionals more sane. Thanks @DouweM for pointing it out. See merge request !6000
| * Minor edits to two_factor_recovery_codes API error catchingDrew Blessing2016-08-311-5/+9
| |
* | Merge branch 'issue_19734' into 'master' Douwe Maan2016-09-013-4/+12
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Project tools visibility level ## part of #19734 ![project_features_access_level](/uploads/81ec7185d4e61d7578652020209af925/project_features_access_level.png) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] API support added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [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 you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5606
| * | Project tools visibility levelFelipe Artur2016-09-013-4/+12
| | |
* | | Merge branch 'merge-request-sha-info' into 'master' Douwe Maan2016-09-011-0/+2
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge request sha info ## What does this MR do? Exposes `sha` and `merge_commit_sha` items in `MergeRequest` API endpoint data. ## Are there points in the code the reviewer needs to double check? No. ## Why was this MR needed? It's useful information. ## What are the relevant issue numbers? Closes #20456. ## Screenshots (if relevant) N/A ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] API support added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [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 you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5966
| * | entities: expose {,merge_commit_}sha in MergeRequestBen Boeckel2016-08-311-0/+2
| | | | | | | | | | | | Fixes #20456.
* | | Merge branch 'refactor/add-policies' into 'master' Robert Speicher2016-08-312-11/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor ability.rb into Policies ## What does this MR do? Factors out `ability.rb` into a new abstraction - the "policy" (stored in `app/policies`). A policy is a class named `#{class_name}Policy` (looked up automatically as needed) that implements `rules` as follows: ``` ruby class ThingPolicy < BasePolicy def rules @user # this is a user to determine abilities for, optionally nil in the anonymous case @subject # this is the subject of the ability, guaranteed to be an instance of `Thing` can! :some_ability # grant the :some_ability permission cannot! :some_ability # ensure that :some_ability is not allowed. this overrides any `can!` that is called before or after delegate! @subject.other_thing # merge the abilities (can!) and prohibitions (cannot!) from `@subject.other_thing` can? :some_ability # test whether, so far, :some_ability is allowed end def anonymous_rules # optional. if not implemented `rules` is called where `@user` is nil. otherwise this method is called when `@user` is nil. end end ``` See merge request !5796
| * | | use a nil subject when we want to check global abilitieshttp://jneen.net/2016-08-302-2/+2
| | | |
| * | | remove Ability.abilitieshttp://jneen.net/2016-08-301-5/+1
| | | |
| * | | remove six, and use a Set insteadhttp://jneen.net/2016-08-301-5/+1
| | | |
* | | | Add BroadcastMessage API implementationRobert Speicher2016-08-313-0/+105
| | | |