Commit Graph

1950 Commits

Author SHA1 Message Date
Ruben Davila dbd1bdaeed More updates for translations plus some refactoring. 2017-05-03 21:08:43 -05:00
Sean McGivern 3efe534255 Merge branch '26488-target-disabled-mr' into 'master'
Fix 404 when upstream disabled merge requests

Closes #26488

See merge request !10427
2017-05-02 11:14:41 +00:00
Stan Hu 303504df47 Revert "Merge branch 'tc-no-todo-service-select' into 'master'"
This reverts merge request !10845
2017-04-29 12:29:59 +00:00
Robert Speicher c3c465ace0 Merge branch 'tc-no-todo-service-select' into 'master'
Avoid plucking Todo ids in TodoService

Closes #30374

See merge request !10845
2017-04-28 18:41:37 +00:00
Rémy Coutable 86038fa5d5 Merge branch '29505-allow-admins-sudo-to-blocked-users' into 'master'
Allow admins to sudo to blocked users

See merge request !10842
2017-04-27 12:32:47 +00:00
Toon Claes a204d14c67 Avoid plucking Todo ids and use sub-queries instead
TodoService should not call `.select(&:id)` on todos, because this is
bad performance. So instead use sub-queries, which will result in a
single SQL query to the database.

https://docs.gitlab.com/ee/development/sql.html#plucking-ids
2017-04-27 09:57:09 +02:00
Luigi Leoni 615a77df83 Wrong method call on notify_post_receive. 2017-04-27 09:33:48 +02:00
mhasbini ccac05dd90 Fix 404 when upstream has disabled merge requests 2017-04-27 01:04:07 +03:00
Rémy Coutable f8f49cf516 Merge branch '26437-closed-by' into 'master'
Add issues/:iid/closed_by api endpoint

Closes #26437

See merge request !10511
2017-04-26 11:45:10 +00:00
Timothy Andrew 4dfdef2ddf Allow admins to sudo to blocked users.
- Currently, (for example) admins can't delete snippets for blocked users, which
  is an unexpected limitation.

- We modify `authenticate!` to conduct the `access_api` policy check against the
  `initial_current_user`, instead of the user being impersonated.

- Update CHANGELOG for !10842
2017-04-26 08:00:19 +00:00
Robert Schilling 2ea5d4b7af Ability to filter merge requests by labels and milestones 2017-04-25 22:07:38 +02:00
Sean McGivern 6dc424c949 Merge branch '29903-remove-user-is-admin-flag-from-api' into 'master'
Don't display the `is_admin?` flag for user API responses

Closes #29903

See merge request !10846
2017-04-25 10:57:32 +00:00
Timothy Andrew 34b71e734b Don't display the `is_admin?` flag for user API responses.
- To prevent an attacker from enumerating the `/users` API to get a list of all
  the admins.

- Display the `is_admin?` flag wherever we display the `private_token` - at the
  moment, there are two instances:

  - When an admin uses `sudo` to view the `/user` endpoint
  - When logging in using the `/session` endpoint
2017-04-25 09:46:05 +00:00
Chris Wilson e670cb271e Fix updating merge_when_build_succeeds via merge API endpoint
When updating a merge request via the `/merge` endpoint we
check the `mergeable` and `mergeable_state` status, these will return
`false` if the application option only_allow_merge_if_pipeline_succeeds is
enabled. We should skip CI checks if the request uses the
merge_when_pipeline_succeeds param

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/22740
2017-04-24 20:51:05 +10:00
Sean McGivern 1b92958638 Merge branch 'fix-jobs-enabled-parameter' into 'master'
Replace builds_enabled with jobs_enabled in projects API v4

Closes #31012

See merge request !10786
2017-04-21 09:25:09 +00:00
Douwe Maan d170133bde Refactor changing files in web UI 2017-04-20 00:37:44 +00:00
winniehell de2c2d9cc6 Replace builds_enabled with jobs_enabled in projects API v4 (!10786) 2017-04-20 00:29:09 +02:00
Robert Speicher 93e23a5d71 Merge branch 'query-users-by-extern-uid' into 'master'
Implement search by extern_uid in Users API

See merge request !10509
2017-04-19 19:50:38 +00:00
Robin Bobbitt ddf7e6ae78 Implement search by extern_uid in Users API 2017-04-18 14:55:32 -04:00
Sean McGivern 380e40fee3 Remove unused user activities code 2017-04-14 15:20:55 +02:00
Rémy Coutable 814212621f Expose `last_activity_on` in the User API
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-04-14 15:20:55 +02:00
Sean McGivern 91ac0e038a Port 'Add user activities API' to CE
CE port of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/962
2017-04-14 15:20:55 +02:00
James Lopez 3cb84e06b7 Remove user activities table and use redis instead of PG for recording activities
Refactored specs and added a post deployment migration to remove the activity users table.
2017-04-14 15:20:55 +02:00
James Lopez 2951a8543e Add user activity service and spec. Also added relevant - NOT offline - migration
It uses a user activity table instead of a column in users.
Tested with mySQL and postgreSQL
2017-04-14 15:20:55 +02:00
mhasbini 327e344417 Add issues/:iid/closed_by api endpoint 2017-04-12 14:38:00 +03:00
Z.J. van de Weg e415ad3952 Fix API not accepting job_events for webhooks
When renaming, the argument on the projects hook API was forgotten. Now
one could successfully set it again.

The fix is a little ugly stylewise, but needed as the underlying model
still refers to it as build_events. This commit is to fix it, later we
should migrate the data to a new column. The edit on the spec file makes
sure it passes now, and will fail when we migrate the column.
2017-04-12 10:06:57 +02:00
Oswaldo Ferreira ce4a50fcfb Add share_with_group_lock to CE optional params block 2017-04-10 16:22:48 -03:00
Oswaldo Ferreira fd32960e7c Separate CE params on Grape API 2017-04-10 16:13:48 -03:00
Rémy Coutable 710cd82cc1 Set Git-specific env in /api/internal/allowed
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-04-10 16:10:18 +02:00
blackst0ne 11aff97d88 Remove the User#is_admin? method 2017-04-09 13:20:57 +11:00
Douwe Maan 46aadc5c16 Merge branch '18471-restrict-tag-pushes-protected-tags' into 'master'
Protected Tags

Closes #18471

See merge request !10356
2017-04-07 15:43:28 +00:00
Jacob Vosmaer 20d415a676 Use Gitlab::Git::Repository#gitaly_... more 2017-04-07 12:53:30 +02:00
Kushal Pandya 8a5ca1121b Merge branch 'master' into '18471-restrict-tag-pushes-protected-tags'
# Conflicts:
#   spec/lib/gitlab/import_export/all_models.yml
2017-04-06 21:12:16 +00:00
James Edwards-Jones 55811ac990 Merge branch 'last-green-master' into 18471-restrict-tag-pushes-protected-tags 2017-04-06 21:35:01 +01:00
Douwe Maan 00e00cacf8 Merge branch 'microsoft-teams-integration' into 'master'
adds initial microsoft teams integration

See merge request !10412
2017-04-06 19:37:25 +00:00
Tiago Botelho 1f404065ca adds relevant tests 2017-04-06 19:47:07 +01:00
Kamil Trzciński 828d81ee1f Optimise trace handling code to use streaming instead of full read 2017-04-06 16:20:27 +00:00
Rémy Coutable 32db15b24b Merge branch '28810-projectfinder-should-handle-more-options' into 'master'
ProjectsFinder should handle more options

Closes #28810

See merge request !9682
2017-04-06 10:22:04 +00:00
Rémy Coutable d7e3f2322f Merge branch '30021-api-deploy_keys-can_push-is-not-honoured' into 'master'
Enable creation of deploy keys with write access via the API

Closes #30021

See merge request !10488
2017-04-06 10:11:31 +00:00
Kushal Pandya 18506d4b8b Merge branch 'master' into '18471-restrict-tag-pushes-protected-tags'
# Conflicts:
#   app/assets/javascripts/dispatcher.js
#   app/assets/stylesheets/pages/projects.scss
2017-04-06 09:46:50 +00:00
Jacopo b996a82ff4 ProjectsFinder should handle more options
Extended ProjectFinder in order to handle the following options:
 - current_user - which user use
 - project_ids_relation: int[] - project ids to use
 - params:
   -  trending: boolean
   -  non_public: boolean
   -  starred: boolean
   -  sort: string
   -  visibility_level: int
   -  tags: string[]
   -  personal: boolean
   -  search: string
   -  non_archived: boolean

GroupProjectsFinder now inherits from ProjectsFinder.
Changed the code in order to use the new available options.
2017-04-06 07:11:37 +02:00
Sean McGivern 50a0fd03ad Merge branch '30195-document-search-param-on-api' into 'master'
Add "search" optional param and docs for V4

Closes #30195

See merge request !10358
2017-04-05 21:49:06 +00:00
Robert Speicher ebdfda69bf Merge branch 'gitaly-refs' into 'master'
Implement Gitaly refs client

See merge request !9291
2017-04-05 17:22:45 +00:00
Oswaldo Ferreira 7cb907cc77 Add "search" optional param and docs for V4
Notice that this param is being supported since V3, but we have not added the proper docs for it
2017-04-05 13:50:12 -03:00
Kamil Trzciński 7f8e0bce5a Added mock deployment and monitoring service with environments fixtures 2017-04-05 11:04:34 +00:00
Mark Fletcher 4865a7ab92 Enable creation of deploy keys with write access via the API
* Documentation was incorrectly advertising the missing param
2017-04-05 16:22:28 +10:00
Rémy Coutable 93de37ce1b Merge branch 'bug/api_milestone_merge_requests_scope' into 'master'
Fixes milestone/merge_request API endpoint to really scope the results

See merge request !10369
2017-04-04 16:45:31 +00:00
Alejandro Rodríguez 267cd3e359 Incorporate Gitaly client for refs service 2017-04-04 16:53:44 +02:00
Kamil Trzciński 5efd67942c Merge branch 'backport-sticking-api-helper-changes' into 'master'
Backport API changes needed to fix sticking in EE

See merge request !10376
2017-04-04 11:31:21 +00:00
James Edwards-Jones 90c8bb8301 Fixed developers_can_push in RepoBranch API entity 2017-04-04 01:39:34 +01:00