Commit Graph

233 Commits

Author SHA1 Message Date
GitLab Bot cfd505b198 Add latest changes from gitlab-org/gitlab@master 2021-09-20 21:11:31 +00:00
GitLab Bot 0adc81d8e0 Add latest changes from gitlab-org/gitlab@master 2021-08-10 06:08:47 +00:00
GitLab Bot 01034c2c45 Add latest changes from gitlab-org/gitlab@master 2021-08-05 15:09:46 +00:00
GitLab Bot 6f998d3529 Add latest changes from gitlab-org/gitlab@master 2021-08-02 15:08:56 +00:00
GitLab Bot 1d9f78b3a4 Add latest changes from gitlab-org/gitlab@master 2021-07-28 15:09:57 +00:00
GitLab Bot d950ea420a Add latest changes from gitlab-org/gitlab@master 2021-07-23 06:08:47 +00:00
GitLab Bot 97eb4a0095 Add latest changes from gitlab-org/gitlab@master 2021-06-29 21:07:38 +00:00
GitLab Bot 23b60ed2c1 Add latest changes from gitlab-org/gitlab@master 2021-06-24 09:07:22 +00:00
GitLab Bot d35de87f96 Add latest changes from gitlab-org/gitlab@master 2021-06-15 06:10:17 +00:00
GitLab Bot 0afd7f1817 Add latest changes from gitlab-org/gitlab@master 2021-05-27 12:10:56 +00:00
GitLab Bot a8c1bc6f75 Add latest changes from gitlab-org/gitlab@master 2021-05-25 15:10:33 +00:00
GitLab Bot b89bcf56ec Add latest changes from gitlab-org/gitlab@master 2021-04-08 00:09:11 +00:00
GitLab Bot 61ee5c3635 Add latest changes from gitlab-org/gitlab@master 2021-04-06 09:09:03 +00:00
GitLab Bot 14a2a7de8e Add latest changes from gitlab-org/gitlab@master 2021-04-04 03:08:52 +00:00
GitLab Bot 65be6f9dd4 Add latest changes from gitlab-org/gitlab@master 2021-04-02 21:09:22 +00:00
GitLab Bot a156fc95eb Add latest changes from gitlab-org/gitlab@master 2021-03-25 12:09:19 +00:00
GitLab Bot 72c331ebf5 Add latest changes from gitlab-org/gitlab@master 2021-03-09 18:09:41 +00:00
GitLab Bot eb1755b2d9 Add latest changes from gitlab-org/gitlab@master 2021-03-02 21:11:07 +00:00
GitLab Bot 7131f9028d Add latest changes from gitlab-org/gitlab@master 2021-02-18 21:10:43 +00:00
GitLab Bot c0ef148ef3 Add latest changes from gitlab-org/gitlab@master 2021-02-17 18:09:19 +00:00
GitLab Bot 3c53fbc50b Add latest changes from gitlab-org/gitlab@master 2021-02-09 12:09:48 +00:00
GitLab Bot b4d79e4b91 Add latest changes from gitlab-org/gitlab@master 2021-02-06 00:09:54 +00:00
GitLab Bot fcef382cb9 Add latest changes from gitlab-org/gitlab@master 2021-01-19 09:10:32 +00:00
GitLab Bot 8106ac487c Add latest changes from gitlab-org/gitlab@master 2021-01-14 15:10:46 +00:00
GitLab Bot ab9c1dbb2d Add latest changes from gitlab-org/gitlab@master 2021-01-13 09:10:52 +00:00
GitLab Bot c66b5f750f Add latest changes from gitlab-org/gitlab@master 2020-12-22 21:10:06 +00:00
GitLab Bot fa6089d8ad Add latest changes from gitlab-org/gitlab@master 2020-12-15 03:10:12 +00:00
GitLab Bot 8f143a46fa Add latest changes from gitlab-org/gitlab@master 2020-12-10 15:10:12 +00:00
GitLab Bot 0d312b8d37 Add latest changes from gitlab-org/gitlab@master 2020-11-24 06:09:49 +00:00
GitLab Bot 8a902a9508 Add latest changes from gitlab-org/gitlab@master 2020-10-22 03:08:25 +00:00
GitLab Bot 6a0085290e Add latest changes from gitlab-org/gitlab@master 2020-10-15 00:08:42 +00:00
GitLab Bot 57ac0bc8f7 Add latest changes from gitlab-org/gitlab@master 2020-09-01 00:10:35 +00:00
GitLab Bot c82ca12a1c Add latest changes from gitlab-org/gitlab@master 2020-08-26 15:10:29 +00:00
GitLab Bot d5cf5cf4f7 Add latest changes from gitlab-org/gitlab@master 2020-07-17 00:09:37 +00:00
GitLab Bot d9aac35d79 Add latest changes from gitlab-org/gitlab@master 2020-07-13 18:09:16 +00:00
GitLab Bot fcda041fc0 Add latest changes from gitlab-org/gitlab@master 2020-07-09 12:08:56 +00:00
GitLab Bot a93bf027c2 Add latest changes from gitlab-org/gitlab@master 2020-07-07 15:08:49 +00:00
GitLab Bot ebe92e84a9 Add latest changes from gitlab-org/gitlab@master 2020-06-26 18:09:03 +00:00
GitLab Bot ce493944f4 Add latest changes from gitlab-org/gitlab@master 2020-06-19 18:08:39 +00:00
GitLab Bot 4cdbecb465 Add latest changes from gitlab-org/gitlab@master 2020-06-11 00:08:35 +00:00
GitLab Bot d48cbe1786 Add latest changes from gitlab-org/gitlab@master 2020-06-08 21:09:17 +00:00
GitLab Bot 8b0ef13236 Add latest changes from gitlab-org/gitlab@master 2020-06-03 18:08:28 +00:00
GitLab Bot 607646ef52 Add latest changes from gitlab-org/gitlab@master 2020-06-03 12:08:21 +00:00
GitLab Bot 1902e25626 Add latest changes from gitlab-org/gitlab@master 2020-05-20 21:09:09 +00:00
GitLab Bot a5650b86b5 Add latest changes from gitlab-org/gitlab@master 2020-05-13 21:08:55 +00:00
GitLab Bot f697dc5e76 Add latest changes from gitlab-org/gitlab@master 2020-04-14 18:09:54 +00:00
GitLab Bot abae8f34f3 Add latest changes from gitlab-org/gitlab@master 2020-03-31 21:08:05 +00:00
GitLab Bot 18f7828977 Add latest changes from gitlab-org/gitlab@master 2020-03-12 09:09:55 +00:00
GitLab Bot c8f773a859 Add latest changes from gitlab-org/gitlab@master 2020-01-30 21:08:47 +00:00
GitLab Bot 22e9af3c8b Add latest changes from gitlab-org/gitlab@master 2020-01-27 12:08:35 +00:00
GitLab Bot b4028d4500 Add latest changes from gitlab-org/gitlab@master 2020-01-07 15:07:34 +00:00
GitLab Bot 7f8330873c Add latest changes from gitlab-org/gitlab@master 2019-12-18 21:07:37 +00:00
GitLab Bot e723867717 Add latest changes from gitlab-org/gitlab@master 2019-12-17 18:07:48 +00:00
GitLab Bot 784fae4b9d Add latest changes from gitlab-org/gitlab@master 2019-12-12 12:07:33 +00:00
GitLab Bot 134fe18200 Add latest changes from gitlab-org/gitlab@master 2019-12-05 21:07:40 +00:00
GitLab Bot 68b6846fa6 Add latest changes from gitlab-org/gitlab@master 2019-11-22 15:06:39 +00:00
GitLab Bot 29c01c6c91 Add latest changes from gitlab-org/gitlab@master 2019-11-14 03:06:25 +00:00
GitLab Bot 759bab0585 Add latest changes from gitlab-org/gitlab@master 2019-11-08 15:06:21 +00:00
GitLab Bot d8ccc7a00b Add latest changes from gitlab-org/gitlab@master 2019-11-07 18:06:21 +00:00
GitLab Release Tools Bot a7329f4372 Merge branch 'security-remove-leaky-401-responses-master' into 'master'
Private/internal repository enumeration via bruteforce on a vulnerable URL

See merge request gitlab/gitlabhq!3454
2019-10-29 15:58:14 +00:00
GitLab Bot b3e4ec8e8a Add latest changes from gitlab-org/gitlab@master 2019-10-23 09:06:03 +00:00
Kerri Miller 8395032721 Avoid #authenticate_user! in #route_not_found
This method, #route_not_found, is executed as the final fallback for
unrecognized routes (as the name might imply.) We want to avoid
`#authenticate_user!` when calling `#route_not_found`;
`#authenticate_user!` can, depending on the request format, return a 401
instead of redirecting to a login page. This opens a subtle security
exploit where anonymous users will receive a 401 response when
attempting to access a private repo, while a recognized user will
receive a 404, exposing the existence of the private, hidden repo.
2019-10-09 10:47:45 -07:00
GitLab Bot 587794b4b8 Add latest changes from gitlab-org/gitlab@master 2019-10-02 00:06:26 +00:00
manojmj a07efbdfd0 CE: Audit event for archiving and unarchiving projects 2019-08-21 09:12:48 +05:30
Peter Leitzen 7b87ed1499 Cleanup usages of `JSON.parse` in specs
Prefer `json_response` where applicable.
2019-07-16 08:03:49 +00:00
Stan Hu d48ee86053 Make Housekeeping button do a full garbage collection
Previously the Housekeeping button and API would use the counter of last
pushes to determine whether to do a full garbage collection, or whether
to do one of the less comprehensive tasks: a full repack, incremental
pack, or ref pack. This was confusing behavior, since a project owner
might have to click the button dozens of times before a full GC would be
initiated.

This commit forces a full GC each time this is initiated. Note that the
`ExclusiveLease` in `HousekeepingService` prevents users from clicking
on the button more than once a day.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/63349
2019-07-03 00:21:33 -07:00
Małgorzata Ksionek b9cb49ad45 Move specs to ce directory 2019-06-03 09:32:12 +02:00
gfyoung 93a44e135b Add some frozen string to spec/**/*.rb
Adds frozen string to the following:

* spec/bin/**/*.rb
* spec/config/**/*.rb
* spec/controllers/**/*.rb

xref https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-04-15 10:17:05 +00:00
Imre Farkas 9bc5ed14fe Move Contribution Analytics related spec in spec/features/groups/group_page_with_external_authorization_service_spec to EE 2019-04-09 15:38:58 +00:00
Andreas Brandl 0cf23a7f50 Merge branch 'revert-3962b00b' into 'master'
Revert "Merge branch 'if-57131-external_auth_to_ce' into 'master'"

See merge request gitlab-org/gitlab-ce!27051
2019-04-05 14:28:34 +00:00
Andreas Brandl 46b1b9c1d6 Revert "Merge branch 'if-57131-external_auth_to_ce' into 'master'"
This reverts merge request !26823
2019-04-05 13:02:56 +00:00
Stan Hu f1dce21609 Enable FindCommit caching for project and commits pages
This reduces a handful of duplicate FindCommit calls while viewing the
projects and commits pages.
2019-04-05 04:52:42 -07:00
Imre Farkas d9d7237d2e Move Contribution Analytics related spec in spec/features/groups/group_page_with_external_authorization_service_spec to EE 2019-04-05 11:45:47 +00:00
Oswaldo Ferreira e540c0d71e Fixed test specs
- added suggestions to mock data
- fixed props to be not required
2019-04-04 13:08:34 +00:00
Małgorzata Ksionek b641c654b1 Refactor specs according to the code review 2019-03-26 09:30:16 +01:00
Małgorzata Ksionek b7ecf43388 Add cr remarks 2019-03-25 11:08:20 +01:00
Małgorzata Ksionek 0b324d3463 Disallow changing namespace of a project in update method 2019-03-20 14:52:18 +01:00
Rémy Coutable 3a2abc1d50
Enable the Layout/ExtraSpacing cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-01-24 13:05:45 +01:00
Dmitriy Zaporozhets f13edec8c7 Add ability to resolve project id into path
By visiting `projects/:id` you will be redirected to project page with
path in it.

projects/123 => foo/bar

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2019-01-22 09:59:10 +02:00
Jasper Maes d53755da68 Fix deprecation: Using positional arguments in integration tests 2019-01-02 22:33:28 +01:00
Tiago Botelho 8772bdabb2
Project guests no longer are able to see refs page
Adds download_code authorization check to ProjectsController#refs
action, to prevent a project guest from seeing branch, tags and
commits information
2018-12-19 10:21:02 +00:00
blackst0ne b44a2c801a Update specs to rails5 format
Updates specs to use new rails5 format.

The old format:
`get :show, { some: params }, { some: headers }`

The new format:
`get :show, params: { some: params }, headers: { some: headers }`
2018-12-19 10:04:31 +11:00
Zeger-Jan van de Weg 896c0bdbfb
Allow public forks to be deduplicated
When a project is forked, the new repository used to be a deep copy of everything
stored on disk by leveraging `git clone`. This works well, and makes isolation
between repository easy. However, the clone is at the start 100% the same as the
origin repository. And in the case of the objects in the object directory, this
is almost always going to be a lot of duplication.

Object Pools are a way to create a third repository that essentially only exists
for its 'objects' subdirectory. This third repository's object directory will be
set as alternate location for objects. This means that in the case an object is
missing in the local repository, git will look in another location. This other
location is the object pool repository.

When Git performs garbage collection, it's smart enough to check the
alternate location. When objects are duplicated, it will allow git to
throw one copy away. This copy is on the local repository, where to pool
remains as is.

These pools have an origin location, which for now will always be a
repository that itself is not a fork. When the root of a fork network is
forked by a user, the fork still clones the full repository. Async, the
pool repository will be created.

Either one of these processes can be done earlier than the other. To
handle this race condition, the Join ObjectPool operation is
idempotent. Given its idempotent, we can schedule it twice, with the
same effect.

To accommodate the holding of state two migrations have been added.
1. Added a state column to the pool_repositories column. This column is
managed by the state machine, allowing for hooks on transitions.
2. pool_repositories now has a source_project_id. This column in
convenient to have for multiple reasons: it has a unique index allowing
the database to handle race conditions when creating a new record. Also,
it's nice to know who the host is. As that's a short link to the fork
networks root.

Object pools are only available for public project, which use hashed
storage and when forking from the root of the fork network. (That is,
the project being forked from itself isn't a fork)

In this commit message I use both ObjectPool and Pool repositories,
which are alike, but different from each other. ObjectPool refers to
whatever is on the disk stored and managed by Gitaly. PoolRepository is
the record in the database.
2018-12-07 19:18:37 +01:00
Cindy Pallares fe5f75930e
Merge branch 'security-fix-pat-web-access' into 'master'
[master] Resolve "Personal access token with only `read_user` scope can be used to authenticate any web request"

See merge request gitlab/gitlabhq!2583
2018-11-28 19:13:59 -05:00
James Lopez a2aa505805
Refactor code to remove object storage flag from Import/Export
Updated docs, refactor import/export code
Fix AvatarUploader path issue
Fix project export upload webhook error
2018-09-06 16:52:42 +02:00
Winnie Hellmann 743add978a Move badge settings to general settings 2018-09-03 13:16:23 +00:00
Mark Chao a63bce1a4b Resolve "Rename the `Master` role to `Maintainer`" Backend 2018-07-11 14:36:08 +00:00
Lin Jen-Shin 4ee08b77bc Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
James Lopez a2bf164154
Update Import/Export to use object storage (based on aa feature flag) 2018-07-06 15:46:18 +02:00
Oswaldo Ferreira d038fac4b6 Present state indication on GFM preview 2018-07-05 23:24:11 -03:00
Aram Visser 0d22b2141f Set flash error message only for current request when updating project 2018-06-25 10:19:13 +07:00
Hiroyuki Sato 59154779d8 The json keys of ref switcher should not be translated 2018-06-20 13:02:08 +09:00
Jacob Vosmaer (GitLab) 5cf5680f9c Deny repository disk access in development and test 2018-06-14 11:18:25 +00:00
Robert Speicher 6d165c740c Make all uses of `fixture_file_upload` use relative paths 2018-06-07 09:54:41 -05:00
Nick Thomas 6b0c6e69e1
Use hashed storage in the specs 2018-02-07 13:40:46 +00:00
blackst0ne 27c95364b5 Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
Sean McGivern a39d6d896f Merge branch '32878-merge-request-from-email' into 'master'
Create merge request from email

Closes #32878

See merge request gitlab-org/gitlab-ce!13817
2017-12-05 12:28:49 +00:00
Jan Provaznik 8cce70730c Create merge request from email
* new merge request can be created by sending an email to the specific
email address (similar to creating issues by email)
* for the first iteration, source branch must be specified in the mail
subject, other merge request parameters can not be set yet
* user should enable "Receive notifications about your own activity" in
user settings to receive a notification about created merge request

Part of #32878
2017-12-05 08:41:58 +01:00
Bob Van Landuyt 3d4ba90c50 Count occurrences of a specific query in the query recorder. 2017-12-04 17:43:48 +01:00
Bob Van Landuyt 20f78421c8 Cache the forks in a namespace in the RequestStore
On the `show` of a project that is part of a fork network. We check if
the user already created a fork of this project in their personal
namespace.

We do this in several places, so caching the result of this query in
the request store prevents us from repeating it.
2017-12-04 17:43:48 +01:00