Commit Graph

210 Commits

Author SHA1 Message Date
GitLab Bot 290b2ab01b Add latest changes from gitlab-org/gitlab@master 2021-03-29 09:09:15 +00:00
GitLab Bot c0dd450008 Add latest changes from gitlab-org/gitlab@master 2021-03-26 12:09:15 +00:00
GitLab Bot b38fc20ae0 Add latest changes from gitlab-org/gitlab@master 2021-03-23 12:09:33 +00:00
GitLab Bot d5d47b45dd Add latest changes from gitlab-org/gitlab@master 2021-03-04 12:11:11 +00:00
GitLab Bot ea8c112615 Add latest changes from gitlab-org/gitlab@master 2021-02-24 06:11:32 +00:00
GitLab Bot 215cb09934 Add latest changes from gitlab-org/gitlab@master 2020-11-02 15:08:52 +00:00
GitLab Bot 6a0085290e Add latest changes from gitlab-org/gitlab@master 2020-10-15 00:08:42 +00:00
GitLab Bot 15229b03e0 Add latest changes from gitlab-org/gitlab@master 2020-09-30 21:10:09 +00:00
GitLab Bot 08b3b98051 Add latest changes from gitlab-org/gitlab@master 2020-09-01 12:11:01 +00:00
Francisco Javier López 4d3f7ae1ef
Removed API endpoint and specs 2018-05-30 18:23:07 +02:00
blackst0ne 4cff66a6c4 Add 'squash and rebase' feature to CE 2018-05-29 20:51:43 +11:00
Rémy Coutable a46929ea2f
Use ApplicationSetting.current_without_cache instead of ApplicationSetting.current where applicable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-05-23 16:14:43 +02:00
Stan Hu 6c190d273d Move API group deletion to Sidekiq 2018-05-18 01:05:11 +00:00
Kamil Trzciński 60b14e5296 Merge branch 'jprovazn-remote-upload-destroy' into 'master'
Delete remote uploads

Closes #45425

See merge request gitlab-org/gitlab-ce!18698
2018-05-16 20:29:21 +00:00
Dylan Griffith c3f9d80a6e Rename User#ci_authorized_runners -> ci_owned_runners 2018-05-16 10:52:28 +02:00
Jan Provaznik 2060533f91 Whitelisted query limits for group destroy API 2018-05-16 08:58:07 +02:00
🙈 jacopo beschi 🙉 c6b1043e9d Resolve "Make a Rubocop that forbids returning from a block" 2018-04-18 09:19:40 +00:00
Bob Van Landuyt 71ccfde322 Correct permissions for creating merge requests from issues
This could only be possible for users that can create merge requests
within a project.

So they need to be a allowed to create a branch and create a merge request.
2018-04-11 10:51:17 +02:00
James Ramsay 0b1b9c409d Add option to suppress archive commit sha
Repository archives are always named `<project>-<ref>-<sha>` even if
the ref is a commit. A consequence of always including the sha even
for tags is that packaging a release is more difficult because both
the ref and sha must be known by the packager.

- add append_sha option (defaults true) to provide a method for
toggling this feature.

Support added to GitLab Workhorse by gitlab-org/gitlab-workhorse!232
2018-04-04 16:56:18 -04:00
Sean McGivern 835fe4d324 Merge branch '40781-os-to-ce' into 'master'
Bring Object Storage to CE

Closes #4171, #4163, #3370, #2841, and #29203

See merge request gitlab-org/gitlab-ce!17358
2018-03-27 08:20:03 +00:00
Jan 54baf3a362 Resolve "Forking with namespace doesn't work (API)" 2018-03-26 09:22:03 +00:00
Micaël Bergeron fc6587f1f2 Add proxy_download to perform proxied sending of all files 2018-03-09 09:16:06 -05:00
Jean-Baptiste Guerraz 20844326f3 align "confidential issues events" implementation with "issues events" one 2018-03-01 10:51:56 +01:00
Rémy Coutable 1c88d92b3f Improve Member services
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-02-27 16:02:22 +01:00
Rémy Coutable bf41063679 Remove explicit audit event log in MembershipActions
Move it to Members::ApproveAccessRequestService.

Also, note that there was a double audit event log for access request
destruction.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-02-27 16:02:22 +01:00
Robert Speicher fec9fb05a5 Merge branch 'security-10-4-todo-api-reveals-sensitive-information' into 'security-10-4'
Restrict Todo API mark_as_done endpoint to the user's todos only
2018-02-09 12:16:25 -06:00
Jarka Kadlecová 7381944565 Support search in API 2018-02-06 16:02:02 +01:00
Yorick Peterse cca61980d5
Track and act upon the number of executed queries
This ensures that we have more visibility in the number of SQL queries
that are executed in web requests. The current threshold is hardcoded to
100 as we will rarely (maybe once or twice) change it.

In production and development we use Sentry if enabled, in the test
environment we raise an error. This feature is also only enabled in
production/staging when running on GitLab.com as it's not very useful to
other users.
2018-02-01 17:00:46 +01:00
Takuya Noguchi 2b6307f6ad Enable RuboCop Style/RegexpLiteral 2018-02-01 02:06:07 +09:00
Stan Hu 46a6edc731 Remove N+1 queries with /projects/:project_id/{access_requests,members} API endpoints
We can simplify the code quite a bit and improve performance by using
grape-entity merge fields:

https://github.com/ruby-grape/grape-entity/tree/v0.6.0#merge-fields

Relates to #42030
2018-01-30 21:46:09 -08:00
Jan Provaznik 090ca9c33e Use limit for search count queries
Search query is especially slow if a user searches a generic string
which matches many records, in such case search can take tens of
seconds or time out. To speed up the search query, we search only for
first 1000 records, if there is >1000 matching records we just display
"1000+" instead of precise total count supposing that with such amount
the exact count is not so important for the user.

Because for issues even limited search was not fast enough, 2-phase
approach is used for issues: first we use simpler/faster query to get
all public issues, if this exceeds the limit, we just return the limit.
If the amount of matching results is lower than limit, we re-run more
complex search query (which includes also confidential issues).
Re-running the complex query should be fast enough in such case because the
amount of matching issues is lower than limit.

Because exact total_count is now limited, this patch also switches to
to "prev/next" pagination.

Related #40540
2018-01-23 22:33:42 +01:00
Mark Fletcher 062f5b7126 Fix error on empty query for Members API 2018-01-21 16:36:55 +00:00
Douwe Maan 536a47b4b7 Merge branch 'sh-migrate-can-push-to-deploy-keys-projects-10-3' into 'security-10-3'
[10.3] Migrate `can_push` column from `keys` to `deploy_keys_project`

See merge request gitlab/gitlabhq!2276

(cherry picked from commit f6ca52d31bac350a23938e0aebf717c767b4710c)

1f2bd3c0 Backport to 10.3
2018-01-16 17:04:51 -08:00
Stan Hu 0424801ec8 Merge branch 'security-10-3-do-not-expose-passwords-or-tokens-in-service-integrations-api' into 'security-10-3'
Filter out sensitive fields from the project services API

See merge request gitlab/gitlabhq!2281

(cherry picked from commit 476f2576444632f2a9a61b4cead9c1077f2c81d7)

2bcbbda0 Filter out sensitive fields from the project services API
2018-01-16 17:04:38 -08:00
Matija Čupić feb3449709
Use preload instead of includes to avoid joins 2018-01-15 22:04:08 +01:00
Matija Čupić c9840842f1
Eager load user, runner, pipeline and its creator 2018-01-14 23:14:09 +01:00
Matija Čupić c9a1a1552a
Fix N+1 in v3 builds API
The N+1 issue was caused by loading the job_artifacts_archive for each
job (build) individually. Including that in the builds
AssociationRelation fixed the issue.
2018-01-13 22:40:14 +01:00
🙈 jacopo beschi 🙉 729f05f0e3 Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00:00
Douwe Maan 7acabf7c59 Merge branch 'remove-soft-removals' into 'master'
Remove soft removals related code

Closes #37447

See merge request gitlab-org/gitlab-ce!15789
2018-01-11 16:06:01 +00:00
Francisco Javier López f6c1d38259 Add option to disable commit stats to commit API 2018-01-09 11:36:12 +00:00
Yorick Peterse d0b8f536a1
Remove soft removals related code
This removes all usage of soft removals except for the "pending delete"
system implemented for projects. This in turn simplifies all the query
plans of the models that used soft removals. Since we don't really use
soft removals for anything useful there's no point in keeping it around.

This _does_ mean that hard removals of issues (which only admins can do
if I'm not mistaken) can influence the "iid" values, but that code is
broken to begin with. More on this (and how to fix it) can be found in
https://gitlab.com/gitlab-org/gitlab-ce/issues/31114.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/37447
2018-01-08 17:04:45 +01:00
Felipe Artur 5e148d4e93 EE-BACKPORT group boards 2018-01-04 17:28:10 -02:00
Robert Speicher 3e4b45fc21 Only include the user's ID in the time_spent command's update hash
Previously, this would include the entire User record in the update
hash, which was rendered in the response using `to_json`, erroneously
exposing every attribute of that record, including their (now removed)
private token.

Now we only include the user ID, and perform the lookup on-demand.
2017-12-19 15:45:08 -06:00
Markus Koller 257fd57134 Allow password authentication to be disabled entirely 2017-11-23 13:16:14 +00:00
Jacopo 181cd299f9 Adds Rubocop rule for line break after guard clause
Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
2017-11-16 17:58:29 +01:00
Kamil Trzciński 6b01821b0d Merge branch 'fix/sm/31771-do-not-allow-jobs-to-be-erased-new' into 'master'
Do not allow jobs to be erased

Closes #31771

See merge request gitlab-org/gitlab-ce!15216
2017-11-14 10:54:30 +00:00
Douwe Maan fec48c6e17 Use Commit#notes and Note.for_commit_id when possible to make sure we use all the indexes available to us 2017-11-08 12:22:11 +01:00
Shinya Maeda d89c18901b Merge branch 'master' into fix/sm/31771-do-not-allow-jobs-to-be-erased-new 2017-11-07 22:12:19 +09:00
Shinya Maeda afef385337 Add doc. Fix spec. Add erase_build in protected_ref rule 2017-11-07 02:47:05 +09:00
Shinya Maeda c8eb2a914b Fix spec. Revert update check. 2017-11-06 23:24:25 +09:00