summaryrefslogtreecommitdiff
path: root/lib/api
Commit message (Collapse)AuthorAgeFilesLines
* Add highest_role method to UserThiago Presa2019-03-222-1/+5
|
* Apply suggestion to lib/api/search.rbAlexis Reigel2019-03-151-1/+1
|
* un-dry the search api scopeAlexis Reigel2019-03-141-12/+12
| | | | due to the usage in EE this attempt to more DRYness is not worth it.
* return 400 on users search and feature is disabledAlexis Reigel2019-03-141-8/+11
| | | | | | as the params block is evaluated when loading the class and the db connection is not available yet we can't use the feature toggle inside that block.
* add feature flag for users searchAlexis Reigel2019-03-141-1/+8
|
* extract helper for search scope api paramAlexis Reigel2019-03-141-12/+12
|
* add users search to search apiAlexis Reigel2019-03-142-4/+5
|
* Run rubocop -aNick Thomas2019-03-132-20/+14
|
* Merge branch 'resolve-lib-differences' into 'master'Robert Speicher2019-03-1215-717/+842
|\ | | | | | | | | Resolve CE to EE differences in the lib/api directory See merge request gitlab-org/gitlab-ce!25430
| * Add method to API::Variables for filtering paramsYorick Peterse2019-03-041-0/+10
| | | | | | | | | | This allows EE to customize the parameters used in two places, without having to modify the source code directly.
| * Update Triggers documentation per EEYorick Peterse2019-03-041-1/+1
| | | | | | | | | | This backports a line from EE so that both the CE and EE code are identical.
| * Refactor API::Settings for EEYorick Peterse2019-03-041-0/+7
| | | | | | | | | | This refactors API::Settings so that EE can more easily extend its behaviour, without having to modify the CE source code directly.
| * Move API::Services constants to a helperYorick Peterse2019-03-042-695/+724
| | | | | | | | | | | | | | This moves various constants previously defined in API::Services to the API::Helpers::ServicesHelpers module, using class methods instead of constants. This allows EE to extend the returned values, without having to modify the CE source code directly.
| * Refactor API::Search for EEYorick Peterse2019-03-042-9/+38
| | | | | | | | | | This refactors API::Search so that Enterprise Edition can more easily extend its functionality, without having to modify the file directly.
| * Move eventable types constant to a helperYorick Peterse2019-03-042-3/+14
| | | | | | | | | | | | This moves API::ResourceLabelEventsHelpers::EVENTABLE_TYPES to a class method in a separate helper module, allowing EE to redefine it without having to directly modify the source code.
| * Move LFS HTTP URL to a separate methodYorick Peterse2019-03-041-1/+9
| | | | | | | | | | | | This adds a method to API::Internal that returns the URL to use for LFS authentication tokens. This makes it possible for EE to redefine this behaviour, without having to directly modify the source code.
| * Use a method for updating groups in the APIYorick Peterse2019-03-041-1/+9
| | | | | | | | | | | | Similar to creating groups in the groups API, EE injects custom code just before we update an existing group. Moving the update logic to a separate method in CE allows EE to more easily extend it.
| * Use a method for creating groups in the APIYorick Peterse2019-03-041-1/+9
| | | | | | | | | | | | | | EE has some custom behaviour that needs to run before and after creating a group in the API. By moving the group creation logic to a separate method, EE can easily extend this behaviour; without having to directly modify the API source code.
| * Refactor API noteable types constantsYorick Peterse2019-03-044-6/+21
| | | | | | | | | | | | | | | | | | This replaces API::Notes::NOTEABLE_TYPES and API::Discussions::NOTEABLE_TYPES with class methods defined in a separate helper modules. This allows EE to extend the list of noteable types, without having to modify the constant in-place. We can't define these methods directly in the API classes, as they would be used before we're able to extend them in EE.
* | Remove fake repository_path responseFabio Papa2019-03-121-5/+0
| | | | | | | | | | | | The repository_path is no longer needed since https://gitlab.com/gitlab-org/gitlab-shell/merge_requests/231, which closes https://gitlab.com/gitlab-org/gitlab-shell/issues/135.
* | Authenticate the internal API using a headerBob Van Landuyt2019-03-111-4/+7
| | | | | | | | | | Instead of mixing in the shared secret into the querystring or body, we could also specify it in a header.
* | Provide EE backports for filtering by approver featureIgor2019-03-072-0/+18
| | | | | | | | | | Adds custom validator for ArrayNoneAny param Extracts some logic in js into separate files
* | Revert "Merge branch 'id-1951-filter-merge-requests-by-approvers' into 'master'"Igor2019-03-072-18/+0
| | | | | | | | This reverts merge request !24982
* | Merge branch 'sh-optimize-todos-api' into 'master'Sean McGivern2019-03-074-4/+35
|\ \ | | | | | | | | | | | | | | | | | | Significantly reduce N+1 queries in /api/v4/todos endpoint Closes #40378 See merge request gitlab-org/gitlab-ce!25711
| * | Significantly reduce N+1 queries in /api/v4/todos endpointStan Hu2019-03-064-4/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By preloading associations and batching issuable metadata lookups, we can significantly cut the number of SQL queries needed to load the Todos API endpoint. On GitLab.com, my own tests showed my user's SQL queries went from 365 to under 60 SQL queries. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/40378
* | | Provide EE backports for filtering by approver featureIgor2019-03-072-0/+18
| | | | | | | | | | | | | | | Adds custom validator for ArrayNoneAny param Extracts some logic in js into separate files
* | | Merge branch '41888-access-personal-snippets-by-api' into 'master'Robert Speicher2019-03-061-13/+12
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Allow all snippets to be accessed by API Closes #41888 See merge request gitlab-org/gitlab-ce!25772
| * | | Allow all personal snippets to be accessed by APINick Thomas2019-03-061-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Adds the Rubocop ReturnNil copAndrew Newdigate2019-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | This style change enforces `return if ...` instead of `return nil if ...` to save maintainers a few minor review points
* | | | Merge branch 'api-mr-put-labels' into 'master'Sean McGivern2019-03-063-5/+29
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | PUT MergeRequest API endpoint - accept labels as an array See merge request gitlab-org/gitlab-ce!19914
| * | | | Add array support for labelsAlexandru Croitor2019-03-063-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | * Support label parameter as comma separated and array of strings for merge requests and issues api endpoints
| * | | | PUT MergeRequest API endpoint - accept labels as an arrayMario de la Ossa2019-03-061-2/+2
| | | | |
* | | | | API: delete job_artifacts of a single jobRoger Rüttimann2019-03-062-0/+20
|/ / / /
* | | | Accept force option on commit via APIPatrick Bajao2019-03-061-0/+1
| |/ / |/| | | | | | | | | | | | | | | | | | | | When `force` is set to `true` and `start_branch` is set, the branch will be ovewritten with the new commit based on the `HEAD` of the `start_branch`. This commit includes changes to update the `gitaly-proto` gem.
* | | Add metadata about the GitLab server to GraphQLNick Thomas2019-03-052-1/+39
|/ /
* | Merge dev master into GitLab.com masterYorick Peterse2019-03-046-39/+43
|\ \ | |/ |/|
| * Merge branch 'security-commit-private-related-mr' into 'master'Yorick Peterse2019-03-041-1/+9
| |\ | | | | | | | | | | | | | | | | | | Don't allow non-members to see private related MRs Closes #2787 See merge request gitlab/gitlabhq!2866
| | * Modify MergeRequestsFinder to allow filtering by commitPatrick Bajao2019-01-281-1/+7
| | |
| | * Respond with 403 when non-member requests for private MRsPatrick Bajao2019-01-281-0/+2
| | |
| * | Forbid creating discussions for users with restricted accessIgor Drozdov2019-03-041-11/+3
| | |
| * | Merge branch 'security-protect-private-repo-information' into 'master'Yorick Peterse2019-03-043-18/+23
| |\ \ | | | | | | | | | | | | | | | | Fix leaking private repository information in API See merge request gitlab/gitlabhq!2881
| | * | Prevent leaking of private repo data through APILuke Duncalfe2019-02-183-18/+23
| | | | | | | | | | | | | | | | | | | | default_branch, statistics and config_ci_path are now only exposed if the user has permissions to the repository.
| * | | Merge branch 'security-tags-oracle' into 'master'Yorick Peterse2019-03-041-0/+2
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent Releases links API to leak tag existence Closes #2795 See merge request gitlab/gitlabhq!2893
| | * | | Prevent Releases links API to leak tag existanceAlessio Caiazza2019-02-081-0/+2
| | | | |
| * | | | Merge branch ↵Yorick Peterse2019-03-041-9/+6
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '2802-security-add-public-internal-groups-as-members-to-your-project-idor' into 'master' Add public/internal groups as members to your Project(IDOR) See merge request gitlab/gitlabhq!2898
| | * | | | Change policy regarding group visibilityMałgorzata Ksionek2019-02-201-9/+6
| | | | | |
* | | | | | add tag_list param to runners apiAlexis Reigel2019-02-271-0/+6
| | | | | |
* | | | | | Merge branch '42086-project-fetch-statistics-api-http-only' into 'master'57125-heatmap-chart-typeNick Thomas2019-02-273-0/+36
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve "Project fetch statistics API (HTTP only)" Closes #42086 See merge request gitlab-org/gitlab-ce!23596
| * | | | | | Add project http fetch statistics APIJacopo2019-02-273-0/+36
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | The API get projects/:id/traffic/fetches allows user with write access to the repository to get the number of clones for the last 30 days.
* | | | | | Merge branch 'osw-merge-refs-refreshing-api' into 'master'Douwe Maan2019-02-271-0/+25
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API support for MR merge to temporary merge ref path Closes #57252 See merge request gitlab-org/gitlab-ce!24918