Commit Graph

2319 Commits

Author SHA1 Message Date
Shinya Maeda d8478d166b Fix spec 2017-09-03 23:49:11 +09:00
Shinya Maeda 13b9b5f11a Improve API arguments as String 2017-09-03 23:49:10 +09:00
Shinya Maeda 6f19fc1147 Add API support 2017-09-03 23:49:10 +09:00
Jacob Schatz 8100274518 Merge branch 'issue-discussions-refactor' into 'master'
Issue discussions Vue refactor

See merge request !12069
2017-09-02 11:55:18 +00:00
Robert Speicher 223849fa17 Merge branch '17849-allow-admin-to-restrict-min-key-length-and-techno' into 'master'
Add settings for minimum key strength and allowed key type

Closes #17849

See merge request !13712
2017-09-01 19:23:08 +00:00
Sean McGivern d550aefe16 Merge branch 'rs-api-use-project-requirements' into 'master'
API: Use defined project requirements

See merge request !13960
2017-09-01 09:04:58 +00:00
Dmitriy Zaporozhets 6f96ccaa7d Merge branch 'gitaly-shell-redis' into 'master'
Implement /internal/post_receive unified endpoint for PostReceive tasks

See merge request !13916
2017-09-01 06:49:28 +00:00
Douwe Maan 92edb3edab Merge branch 'master' into issue-discussions-refactor
# Conflicts:
#	app/models/issue.rb
2017-08-31 18:02:19 +02:00
Douwe Maan 52ac5cf27c Merge branch '37266-nomethoderror-undefined-method-current_application_settings-build-failed-30837482' into 'master'
`current_application_settings` belongs on `Gitlab::CurrentSettings`

Closes #37266

See merge request !13955
2017-08-31 14:55:54 +00:00
Alejandro Rodríguez eaf60bb544 Implement /internal/post_receive unified endpoint for PostReceive tasks 2017-08-31 11:31:45 -03:00
Robert Schilling 6a2ee0968e API: Use defined project requirements 2017-08-31 14:57:47 +02:00
Sean McGivern 5883ce95ef `current_application_settings` belongs on `Gitlab::CurrentSettings`
The initializers including this were doing so at the top level, so every object
loaded after them had a `current_application_settings` method. However, if
someone had rack-attack enabled (which was loaded before these initializers), it
would try to load the API, and fail, because `Gitlab::CurrentSettings` didn't
have that method.

To fix this:

1. Don't include `Gitlab::CurrentSettings` at the top level. We do not need
   `Object.new.current_application_settings` to work.
2. Make `Gitlab::CurrentSettings` explicitly `extend self`, as we already use it
   like that in several places.
3. Change the initializers to use that new form.
2017-08-31 13:38:33 +01:00
Douwe Maan 7c215dd23d Merge branch 'master' into issue-discussions-refactor 2017-08-31 09:13:41 +02:00
Nick Thomas eb05bdc6f5 Move the key restriction validation to its own class 2017-08-30 20:50:44 +01:00
Nick Thomas 6847060266 Rework the permissions model for SSH key restrictions
`allowed_key_types` is removed and the `minimum_<type>_bits` fields are
renamed to `<tech>_key_restriction`. A special sentinel value (`-1`) signifies
that the key type is disabled.

This also feeds through to the UI - checkboxes per key type are out, inline
selection of "forbidden" and "allowed" (i.e., no restrictions) are in.

As with the previous model, unknown key types are disallowed, even if the
underlying ssh daemon happens to support them. The defaults have also been
changed from the lowest known bit size to "no restriction". So if someone
does happen to have a 768-bit RSA key, it will continue to work on upgrade, at
least until the administrator restricts them.
2017-08-30 20:50:44 +01:00
Nick Thomas b0f982fbdf Add settings for minimum key strength and allowed key type
This is an amalgamation of:

* Cory Hinshaw: Initial implementation !5552
* Rémy Coutable: Updates !9350
* Nick Thomas: Resolve conflicts and add ED25519 support !13712
2017-08-30 20:50:44 +01:00
Marc Siegfriedt f3b6c552f6 fix :file_path - add requirements: 2017-08-30 18:37:44 +00:00
Robert Speicher 966b635221 Merge branch '28453-add-time-estimate-time-spent-to-api-issue-output' into 'master'
Add time stats to Issue and Merge Request API

Closes #28453

See merge request !13335
2017-08-30 17:35:14 +00:00
Sean McGivern b9d8946395 Don't use public_send in destroy_conditionally! helper
As we only override in two places, we could just ask for the value rather than
the method name.
2017-08-30 14:32:02 +01:00
Sean McGivern 2f1ef2be6f Merge branch '37198-api-doesn-t-respect-default-group-visibility' into 'master'
Respect the default visibility level when creating a group via the API

Closes #37198

See merge request !13903
2017-08-30 10:04:00 +00:00
Sean McGivern f11049ab91 Merge branch 'api-delete-respect-headers' into 'master'
API: Respect the 'If-Unmodified-Since' for delete endpoints

See merge request !9621
2017-08-30 09:56:17 +00:00
Douwe Maan b181d3124e Merge branch 'master' into issue-discussions-refactor
# Conflicts:
#	app/models/issue.rb
2017-08-30 10:14:56 +02:00
Robert Schilling 9edaff0d35 Make rubocop happy 2017-08-30 10:11:24 +02:00
Robert Schilling 67c042e4a5 Respect the default visibility level when creating a group 2017-08-29 16:49:43 +02:00
Travis Miller 749c389345 Add time stats to issue and merge request API end points 2017-08-29 08:31:36 -05:00
Travis Miller ce1ce82045 Resolve new N+1 by adding preloads and metadata to issues end points 2017-08-29 08:31:36 -05:00
Maxim Rydkin 9226804bf3 replace `is_runner_queue_value_latest?` with `runner_queue_value_latest?` 2017-08-29 11:14:41 +03:00
Robert Schilling ee4820a526 Add a spec when ressource is not modified 2017-08-29 10:12:10 +02:00
Robert Schilling dcd4ea473c Update remaining endpoints 2017-08-28 17:10:30 +02:00
Robert Schilling f0f3f38576 Use commit date for branches and tags 2017-08-28 16:40:25 +02:00
Robert Schilling e80313f9ee Conditionally destroy a ressource 2017-08-28 16:40:25 +02:00
Robert Schilling 998afa5f74 API: Respect the 'If-Unmodified-Since' for delete endpoints 2017-08-28 16:40:25 +02:00
Nick Thomas 2adff699ce Refactor complicated API group finding rules into GroupsFinder 2017-08-24 11:33:09 +01:00
Nick Thomas 502d6464b0 Allow v4 API GET requests for groups to be unauthenticated 2017-08-23 18:30:53 +01:00
Douwe Maan fbe82e4cd9 Merge branch 'master' into issue-discussions-refactor
# Conflicts:
#	package.json
2017-08-23 11:31:17 +02:00
Toon Claes e17d9529fa Total Pages should be at least one
And the link to the last page cannot be `page=0`.
2017-08-17 21:47:01 +02:00
Jordan Patterson fdf4f0fc08 don't add next page link if current page is out of range 2017-08-17 21:47:01 +02:00
Douwe Maan 834f1b30d5 Merge branch 'master' into issue-discussions-refactor
# Conflicts:
#	package.json
#	spec/support/features/reportable_note_shared_examples.rb
2017-08-17 14:01:31 +02:00
Zeger-Jan van de Weg dc8e1676cd
Upgrade grape to 1.0
Main feature was the deprication of the Hashie stuff, so the access by
calling keys as method is gone now.
2017-08-16 22:06:31 +02:00
Rémy Coutable fcce6c3168 Merge branch 'rs-more-public-send-whitelists' into 'master'
Whitelist or fix additional `Gitlab/PublicSend` cop violations

See merge request !13467
2017-08-16 11:25:26 +00:00
Robert Speicher 4edfad9678 Enable Layout/TrailingWhitespace cop and auto-correct offenses 2017-08-15 13:44:37 -04:00
Felipe Artur b7e9862004 Fix API responses when dealing with txt files 2017-08-15 11:32:48 -03:00
Robert Speicher 260c8da060 Whitelist or fix additional `Gitlab/PublicSend` cop violations
An upcoming update to rubocop-gitlab-security added additional
violations.
2017-08-14 12:14:11 -04:00
Yorick Peterse aef9f1eb94
Cache the number of forks of a project
The number of forks of a project doesn't change very frequently and
running a COUNT(*) every time this information is requested can be quite
expensive. We also end up running such a COUNT(*) query at least twice
on the homepage of a project.

By caching this data and refreshing it when necessary we can reduce
project homepage loading times by around 60 milliseconds (based on the
timings of https://gitlab.com/gitlab-org/gitlab-ce).
2017-08-14 18:00:28 +02:00
Filipa Lacerda e93214bce6 Merge branch 'master' into issue-discussions-refactor
* master: (66 commits)
  fix confidential border issue as well as confidential styles leaking on new MR
  Migrate force push check to Gitaly
  Add option to disable project export on instance
  Better categorize test coverage results
  Add option to disable project export on instance - db changes
  Better caching and indexing of broadcast messages
  Include the `is_admin` field in the `GET /users/:id` API when current user is an admin
  Document rspec-retry and rspec-flaky
  Fix cop description
  Retrieve and sync flaky specs report from and to S3
  Use a new RspecFlakyListener to detect flaky specs
  Fix formatting of patch_versions.md [skip ci]
  Enable Timecop safe mode
  Show error message for API 500 error in tests, and
  Fix merge request diff deserialisation when too_large was absent
  Delete correct key from `session` after authenticating using U2F
  Bumps omniauth-ldap gem version to 2.0.4
  Pending delete projects no longer return 500 error in Admins projects view
  Do not run the `ee_compat_check` job for stableish branches
  Update gitlab.po: Missing 'r' in "Fouché" that comes from "Fourcher" verb.
  ...
2017-08-12 00:17:48 +01:00
Rémy Coutable 455dc74e65 Merge branch 'disable-project-export' into 'master'
Add option to disable project export on instance

See merge request !13211
2017-08-11 17:33:45 +00:00
Robin Bobbitt 649d042dbc Add option to disable project export on instance 2017-08-11 12:22:37 -04:00
Sean McGivern 0887a2bd10 Merge branch '36213-return-is_admin-in-users-api-when-current_user-is-admin' into 'master'
Include the `is_admin` field in the `GET /users/:id` API when current user is an admin

Closes #36213

See merge request !13501
2017-08-11 15:46:17 +00:00
Sean McGivern e80a893ff0 Merge branch 'split-events-into-push-events' into 'master'
Use a separate table for storing push events

See merge request !12463
2017-08-11 14:40:03 +00:00
Rémy Coutable 09a348eb13
Include the `is_admin` field in the `GET /users/:id` API when current user is an admin
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-11 15:14:32 +02:00