summaryrefslogtreecommitdiff
path: root/lib/api
Commit message (Collapse)AuthorAgeFilesLines
* Remove many N+1 queries with merge requests APIsh-optimize-mr-apiStan Hu2017-07-071-1/+3
| | | | | | Identified via `ENABLE_BULLET=1 bundle exec rspec spec/requests/api/merge_requests_spec.rb:34` Improves speed of #34159
* Merge branch '33929-allow-to-enable-perf-bar-for-a-group' into 'master'Sean McGivern2017-07-071-12/+17
|\ | | | | | | | | | | | | Allow to enable the performance bar per user or Feature group Closes #33929 and #34528 See merge request !12362
| * Merge branch 'master' into '33929-allow-to-enable-perf-bar-for-a-group'Sean McGivern2017-07-072-5/+13
| |\ | | | | | | | | | # Conflicts: # db/schema.rb
| * \ Merge branch 'master' into 33929-allow-to-enable-perf-bar-for-a-groupSean McGivern2017-07-074-52/+90
| |\ \
| * | | Improve Features API and its docs and add a Changelog itemRémy Coutable2017-07-061-12/+17
| | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | Merge branch 'feature/user-agent-details-api' into 'master'Douwe Maan2017-07-074-0/+54
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | Allow admins to retrieve user agent details for an issue or snippet Closes #29508 See merge request !12655
| * | | add spec and project snippet user agent details endpointJames Lopez2017-07-071-0/+16
| | | |
| * | | refactor code based on feedbackJames Lopez2017-07-063-5/+3
| | | |
| * | | add user agent details API endpoints to issues and snippetsJames Lopez2017-07-062-0/+34
| | | |
| * | | add issues spec and user agent details to entitiesJames Lopez2017-07-061-0/+6
| | | |
* | | | Merge branch ↵Kamil Trzciński2017-07-071-3/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'feature/intermediate/32568-adding-variables-to-pipelines-schedules' into 'master' Add variables to pipelines schedules Closes #32568 See merge request !12372
| * | | | Remove update|admin_pipeline_schedule from Project, and grant it in ↵Kamil Trzcinski2017-07-071-3/+6
| | |_|/ | |/| | | | | | | | | | PipelineSchedule
* | | | Native group milestonesFelipe Artur2017-07-071-2/+7
|/ / /
* | | Merge branch '33748-fix-n-plus-1-query-in-the-projects-api' into 'master'Robert Speicher2017-07-072-2/+18
|\ \ \ | |/ / |/| | | | | | | | | | | | | | Fix some N+1 queries in the GET /projects API Closes #33748 See merge request !12679
| * | Fix some N+1 queries in the GET /projects APIRémy Coutable2017-07-072-2/+18
| | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | Merge branch '34716-environment-specific-variables-ce' into 'master'Douwe Maan2017-07-061-2/+6
|\ \ \ | |/ / |/| | | | | | | | | | | | | | Backports for ee-2112 Closes #34716 See merge request !12671
| * | Backports for ee-2112Lin Jen-Shin2017-07-061-2/+6
| |/ | | | | | | https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2112
* | Merge branch '33657-user-projects-api' into 'master'Rémy Coutable2017-07-062-49/+67
|\ \ | |/ |/| | | | | | | | | Add user projects API Closes #33657 See merge request !12596
| * Add user projects APIvanadium232017-07-062-49/+67
| |
* | Merge branch '33772-readonly-gitlab-ci-cache' into 'master'Kamil Trzciński2017-07-061-1/+1
|\ \ | | | | | | | | | | | | | | | | | | Introduce cache policies for CI jobs Closes #33772 See merge request !12483
| * | Introduce cache policies for CI jobsNick Thomas2017-07-051-1/+1
| | |
* | | Merge branch '32815--Add-Custom-CI-Config-Path' into 'master'Grzegorz Bizon2017-07-062-0/+2
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | Resolve "Project option to allow customizing CI/CD config path" Closes #32815 and #33130 See merge request !12509
| * | Merge remote-tracking branch 'upstream/master' into ↵Lin Jen-Shin2017-07-057-28/+89
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 32815--Add-Custom-CI-Config-Path * upstream/master: (149 commits) Revert change to design. Go back to scrollable page Fixes the column widths for the new navigation options in settings Migrate #submodule_url_for to Gitaly Add test example for external commit status retries Fix invalid Rails.logger call in lib/gitlab/health_checks/fs_shards_check.rb Fix build for !12300. Log rescued exceptions to Sentry Fix issues with non-UTF8 filenames by always fixing the encoding of tree and blob paths Revert "Merge branch 'revert-12499' into 'master'" Prevent accidental deletion of protected MR source branch by repeating checks before actual deletion Improve the overall UX for the new monitoring dashboard Document that GitLab 9.3 requires the TRIGGER permission on MySQL Instrument Unicorn with Ruby exporter Remove group modal like remove project modal. Closes #33130 Update prometheus client gem Enables the option in user preferences to turn on the new navigation Add Jasmine tests for `OAuthRememberMe` Simplify authentication logic in the v4 users API for !12445. Use stub_application_setting when testing ApplicationHelper#support_url wait_for_requests is not needed when AJAX is not in play ...
| * | Rename ci_config_file to ci_config_pathLin Jen-Shin2017-07-052-2/+2
| | |
| * | Fix various descriptions given the feedbackLin Jen-Shin2017-07-041-1/+1
| | |
| * | Merge remote-tracking branch 'upstream/master' into ↵Lin Jen-Shin2017-06-305-9/+49
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 32815--Add-Custom-CI-Config-Path * upstream/master: (123 commits) Backport changes to Projects::IssuesController and the search bar bugfix: use `require_dependency` to bring in DeclarativePolicy Resolve "Select branch dropdown is too close to branch name" Clean up issuable lists Defer project destroys within a namespace in Groups::DestroyService#async_execute Fixed new navgiation bar logo height in Safari Resolve "Issue dropdown persists when adding issue number to issue description" Move verification to block level instead of paragraph Revert "Merge branch 'dm-drop-default-scope-on-sortable-finders' into 'master'" Added code for defining SHA attributes Minor edits Job details won't scroll horizontally to show long lines Run mysql tests on stable preperation branches like 9-3-stable-patch-2 Bring back branches badge to main project page optimize translation content based on comments supplement traditional chinese in taiwan translation Inserts exact matches of username, email and name to the top of the user search list Remove Namespace model default scope override and write additional test to Project search optimize translation content based on comments Limit OpenGraph image size to 64x64 ...
| * \ \ Merge remote-tracking branch 'upstream/master' into ↵15041-Add-Custom-CI-Config-PathLin Jen-Shin2017-06-2899-3414/+10794
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 15041-Add-Custom-CI-Config-Path * upstream/master: (12506 commits) Update CHANGELOG.md for 9.3.2 Update architecture.md Fix changelog entry file extension Fix head pipeline stored in merge request for external pipelines updated gitlab-ci.yml to compile locale Ignore JSON files generated from PO files Update mmap2 gem tha disables mmap_obj.gsub! as current implementation uses method that is no longer part of Ruby API Disable rainbow during SimpleExecutor specs to have consistence Slightly refactor pipeline schedules form in preparation for additions Resolve "Submitting reply to existing diff discussion using Cmd/Ctrl+Enter submits twice and refreshes page" Make the SimpleExecutor rescue exceptions in the executing Checks Resolve "Unable to access edit comment from dropdown menu in certain screen sizes" Update changelog item revert removal of requestAnimationFrame and move to a separate MR/discussion rename getEmojiCategoryMap and remove unnecessary parameter Action Buttons on Prio Labels working again by setting pointer events to none on… Remove 'contains' option from Commit.find_all Remove Gitlab::Git::Repository#find_all Use latest chrome and chrome driver in GitLab QA Polish sidebar toggle ...
| * | | | Add config option to project to allow custom .gitlab-ci.yml locationKeith Pope2016-10-082-0/+7
| | | | |
* | | | | Create and use project path helpers that only need a project, no namespaceDouwe Maan2017-07-051-1/+1
| |_|_|/ |/| | |
* | | | Merge branch 'master' into '33580-fix-api-scoping'Douwe Maan2017-07-047-19/+70
|\ \ \ \ | | | | | | | | | | | | | | | # Conflicts: # lib/api/users.rb
| * \ \ \ Merge branch '34141-allow-unauthenticated-access-to-the-users-api' into 'master'Rémy Coutable2017-07-041-6/+20
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow unauthenticated access to the `/api/v4/users` API Closes #34141 See merge request !12445
| | * | | | Simplify authentication logic in the v4 users API for !12445.Timothy Andrew2017-07-042-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Rather than using an explicit check to turn off authentication for the `/users` endpoint, simply call `authenticate_non_get!`. - All `GET` endpoints we wish to restrict already call `authenticated_as_admin!`, and so remain inacessible to anonymous users. - This _does_ open up the `/users/:id` endpoint to anonymous access. It contains the same access check that `/users` users, and so is safe for use here. - More context: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12445#note_34031323
| | * | | | Merge remote-tracking branch 'origin/master' into ↵Timothy Andrew2017-06-3010-23/+72
| | |\ \ \ \ | | | | |_|/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | 34141-allow-unauthenticated-access-to-the-users-api - Modify policy code to work with the `DeclarativePolicy` refactor in 37c401433b76170f0150d70865f1f4584db01fa8.
| | * | | | Implement review comments for !12445 from @godfat and @rymai.Timothy Andrew2017-06-302-17/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use `GlobalPolicy` to authorize the users that a non-authenticated user can fetch from `/api/v4/users`. We allow access if the `Gitlab::VisibilityLevel::PUBLIC` visibility level is not restricted. - Further, as before, `/api/v4/users` is only accessible to unauthenticated users if the `username` parameter is passed. - Turn off `authenticate!` for the `/api/v4/users` endpoint by matching on the actual route + method, rather than the description. - Change the type of `current_user` check in `UsersFinder` to be more compatible with EE.
| | * | | | Allow unauthenticated access to the `/api/v4/users` API.Timothy Andrew2017-06-262-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The issue filtering frontend code needs access to this API for non-logged-in users + public projects. It uses the API to fetch information for a user by username. - We don't authenticate this API anymore, but instead - if the `current_user` is not present: - Verify that the `username` parameter has been passed. This disallows an unauthenticated user from grabbing a list of all users on the instance. The `UsersFinder` class performs an exact match on the `username`, so we are guaranteed to get 0 or 1 users. - Verify that the resulting user (if any) is accessible to be viewed publicly by calling `can?(current_user, :read_user, user)`
| * | | | | Optimize creation of commit API by using Repository#commit instead of ↵sh-optimize-project-commit-apiStan Hu2017-07-031-1/+1
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Repository#commits Repository#commits is expensive because it has to use Rugged to walk the Git tree as opposed to doing a direct ref lookup. Improves performance in #34533
| * | | | bugfix: use `require_dependency` to bring in DeclarativePolicybugfix/declarative-policy-reloadinghttp://jneen.net/2017-06-291-1/+1
| | | | |
| * | | | Merge branch '34078-allow-to-enable-feature-flags-with-more-granularity' ↵Robert Speicher2017-06-291-5/+34
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into 'master' Allow the feature flags to be enabled/disabled with more granularity Closes #34078 See merge request !12357
| | * | | | Rename flipper_group to feature_group34078-allow-to-enable-feature-flags-with-more-granularityRémy Coutable2017-06-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| | * | | | Rename FLippable to FeatureGate and make `flipper_group` and `user` mutually ↵Rémy Coutable2017-06-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | exclusive Signed-off-by: Rémy Coutable <remy@rymai.me>
| | * | | | Allow the feature flags to be enabled/disabled with more granularityRémy Coutable2017-06-271-5/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows to enable/disable a feature flag for a given user, or a given Flipper group (must be declared statically in the `flipper.rb` initializer beforehand). Signed-off-by: Rémy Coutable <remy@rymai.me>
| * | | | | Merge branch 'refactor/declarative-policy' into 'master'Sean McGivern2017-06-291-1/+3
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor/declarative policy See merge request !10515
| | * | | | | use subject scope in :id/usershttp://jneen.net/2017-06-271-1/+3
| | |/ / / / | | | | | | | | | | | | | | | | | | since we're loading all the members anyways
| * | | | | Merge branch 'add-members-count-and-parent-id-data-on-namespaces-api' into ↵Douwe Maan2017-06-292-2/+10
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'master' Add group members counting related data on namespaces API See merge request !12497
| | * | | | | Rename members_count to members_count_with_descendants and expose only to ↵Oswaldo Ferreira2017-06-282-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | group admins
| | * | | | | Add "members_count" and "parent_id" data on namespaces APIOswaldo Ferreira2017-06-281-1/+5
| | | |_|_|/ | | |/| | |
| * | | | | Fix current feature related specsTiago Botelho2017-06-281-1/+2
| |/ / / /
* | | | | `AccessTokenValidationService` accepts `String` or `API::Scope` scopes.Timothy Andrew2017-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | - There's no need to use `API::Scope` for scopes that don't have `if` conditions, such as in `lib/gitlab/auth.rb`.
* | | | | Extract a `Gitlab::Scope` class.Timothy Andrew2017-06-292-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | - To represent an authorization scope, such as `api` or `read_user` - This is a better abstraction than the hash we were previously using.
* | | | | Implement review comments from @DouweM for !12300.Timothy Andrew2017-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use a struct for scopes, so we can call `scope.if` instead of `scope[:if]` - Refactor the "remove scopes whose :if condition returns false" logic to use a `select` rather than a `reject`.