Commit Graph

18 Commits

Author SHA1 Message Date
GitLab Bot b7dfe2ae40 Add latest changes from gitlab-org/gitlab@master 2019-09-13 13:26:31 +00:00
dineshpanda 980303b542 Avoid calling freeze on already frozen strings in app/controllers 2019-09-01 01:57:25 +05:30
Martin Wortschack 5660690787 Externalize strings in projects controllers
- concerns
- dashboard
- groups
- import
2019-03-27 16:52:52 +00:00
gfyoung 12ee2753c1 Enable even more frozen string in app/controllers
Enables frozen string for some vestigial files as
well as the following:

* app/controllers/projects/**/*.rb
* app/controllers/sherlock/**/*.rb
* app/controllers/snippets/**/*.rb
* app/controllers/users/**/*.rb

Partially addresses #47424.
2018-09-25 22:43:49 -07:00
Yorick Peterse 2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
Stan Hu c5645a6739 Fix LFS uploads not working with git-lfs 2.5.0
git-lfs 2.5.0 now sets the Content-Type header instead of hard-coding it to
application/octet-stream: https://github.com/git-lfs/git-lfs/pull/3137

To avoid this issue, we explicitly tell the client to use
application/octet-stream.

Closes #49752
2018-07-31 06:15:14 -07:00
Lin Jen-Shin 4ee08b77bc Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
Ash McKenzie 4203a8b30b Move check logic into #batch_operation_disallowed? 2018-07-02 17:29:09 +10:00
Bob Van Landuyt 48b17e991a Add helper for accessing lfs_objects for project
This makes accessing LFS Objects for a project easier

  project.lfs_storage_project.lfs_objects`

becomes

  project.all_lfs_objects

This will make the refactor in
https://gitlab.com/gitlab-org/gitlab-ce/issues/39769 easier to deal
with.
2018-04-05 10:21:51 +02:00
Rubén Dávila bed9483211 Backport of LFS File Locking API 2018-02-07 09:04:00 -05:00
Toon Claes d13669716a Create idea of read-only database
In GitLab EE, a GitLab instance can be read-only (e.g. when it's a Geo
secondary node). But in GitLab CE it also might be useful to have the
"read-only" idea around. So port it back to GitLab CE.

Also having the principle of read-only in GitLab CE would hopefully
lead to less errors introduced, doing write operations when there
aren't allowed for read-only calls.

Closes gitlab-org/gitlab-ce#37534.
2017-10-06 22:37:40 +02:00
Rémy Coutable d40e1f547e Enable the Style/TrailingCommaInLiteral cop
Use the EnforcedStyleForMultiline: no_comma option.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-05-10 18:25:45 +02:00
Ben Boeckel 5c20e50f46 lfs: do not require auth for public repositories
LFS has the `authenticated` field in the response for downloads of
objects to indicate that the object does not need authentication to
access it.

Spec: https://github.com/git-lfs/git-lfs/blob/master/docs/api/batch.md#successful-responses

Fixes #23360.
2017-02-07 09:44:24 -05:00
Rémy Coutable 4b3c1e56ae
Move LfsHelper to a new LfsRequest concern
Also create a new WorkhorseRequest concern

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-23 17:28:11 +01:00
Patricio Cano 50f047cadd Move the `objects` method to `LfsHelper` so that it is also available to `LfsStorageController`
It is needed for the `lfs_check_access!` callback when the repository size limit is enabled (EE only).
2016-11-10 20:04:00 -06:00
Jacob Vosmaer 0012de8c8a Rename lfs_enabled helper method 2016-08-10 16:48:21 +02:00
Jacob Vosmaer d199b3cdd7 Better cache when modifying in-place 2016-07-22 17:54:04 +02:00
Jacob Vosmaer 0d9752446d Add LFS controllers 2016-07-22 17:54:04 +02:00