Commit Graph

149 Commits

Author SHA1 Message Date
Robin Bobbitt 649d042dbc Add option to disable project export on instance 2017-08-11 12:22:37 -04:00
Bob Van Landuyt c11ed138a0 Remove deprecated `repository_storage` attribute
In favor of the new `repository_storages`
2017-07-27 11:49:27 +02:00
Robin Bobbitt 672a68d372 Fixes needed when GitLab sign-in is not enabled
When sign-in is disabled:
 - skip password expiration checks
 - prevent password reset requests
 - don’t show Password tab in User Settings
 - don’t allow login with username/password for Git over HTTP requests
 - render 404 on requests to Profiles::PasswordsController
2017-07-13 10:08:27 -04:00
Nick Thomas aeb2869f66 Prevent bad data being added to application settings when Redis is unavailable 2017-07-10 15:40:51 +01:00
Sean McGivern b8c4d5e0f5 Merge branch 'master' into 33929-allow-to-enable-perf-bar-for-a-group 2017-07-07 15:54:39 +01:00
Rémy Coutable 97611c88fc
Don't use Flipper for the Performance Bar
The implementation now simply rely on the
`performance_bar_allowed_group_id` Application Setting.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-07 02:34:51 +02:00
Rémy Coutable 040eeb1039
Allow to enable the Performance Bar for a group from the admin area
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-06 18:57:02 +02:00
Yorick Peterse e1a3bf30b6
Rename ActiverecordSerialize cop
This cop has been renamed to ActiveRecordSerialize to match the way
"ActiveRecord" is usually written.
2017-07-06 12:01:36 +02:00
Robin Bobbitt e09ddc62b3 Help landing page customizations 2017-06-14 11:40:21 -04:00
Paul Charlton d93352825a redesign caching of application settings 2017-06-06 16:48:10 +00:00
Douwe Maan 9464456597 Merge branch 'pull-mirror-overhaul-ce-backport' into 'master'
backports changed import logic from pull mirroring feature into CE

See merge request !11850
2017-06-05 23:40:53 +00:00
Tiago Botelho 810866ecb6 backports changed import logic from pull mirroring feature into CE 2017-06-05 23:09:10 +01:00
Rémy Coutable 4cfa5ce4a9
Enable the Style/PreferredHashMethods cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-06-02 19:11:26 +02:00
Yorick Peterse cd74c1434e
Added Cop to blacklist the use of serialize
This Cop blacklists the use of ActiveRecord's "serialize" method, except
for cases where we already use this.
2017-05-31 14:03:37 +02:00
Sean McGivern 3c546acf78 Allow disabling usage ping in `gitlab.yml`
Setting `usage_ping_enabled` to false in `gitlab.yml`:

1. Disables the usage ping, regardless of the value stored in the database.
2. Prevents the usage ping from being enabled through the admin panel. It can
   only be enabled by either removing the line from `gitlab.yml` and configuring
   through the admin panel, or setting it to true in `gitlab.yml`.
2017-05-11 09:20:11 +01:00
Luke "Jared" Bennett 3a3cf07f93
Merge remote-tracking branch 'origin/master' into add-sentry-js-again-with-vue 2017-04-28 16:03:03 +01:00
Luke "Jared" Bennett 284d4f76fe
Attempted adding separate clientside_sentry settings 2017-04-28 13:41:29 +01:00
Douglas Barbosa Alexandre d464d79032 Lazily sets UUID in ApplicationSetting for new installations 2017-04-26 17:06:15 -03:00
Sean McGivern ebd5e9b454 Port 'Add EE usage ping' to CE
CE port of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/557
2017-04-14 15:20:55 +02:00
Adam Niedzielski 9543025e88 Introduce "polling_interval_multiplier" as application setting
Implement module for setting "Poll-Interval" response header.
Return 429 in ETag caching middleware when polling is disabled.
2017-04-03 15:17:04 +02:00
Stan Hu 681af5bc4f Fix Error 500 when application settings are saved
Due to a Rails bug, fetching the application settings from Redis
may prevent the attribute methods from being loaded for the `ApplicationSetting`
model. More details here: https://github.com/rails/rails/issues/27348

There was also a secondary problem introduced by overriding these
association methods which caused all default visibility levels to be
set to `nil`. Before, the previous implementation allowed the string
"20" to be saved as an integer, while now a table lookup happens
before that. We fix this by enforcing the integer value in the
controller and default to PRIVATE.

Closes #29674
2017-03-18 15:39:48 -07:00
Pawel Chojnacki 80fbced2e0 Add admin settings entries 2017-03-06 15:41:25 +01:00
Pawel Chojnacki e5cf3f51fb Allow limiting logging in users from too many different IPs. 2017-03-06 15:41:24 +01:00
Toon Claes c3b1cb71f0 Override setters so it also accepts string visibility levels
Override the `ApplicationSetting` default visibility_level setters so
they accept strings & integers for the levels.
2017-03-02 16:31:22 +01:00
Toon Claes 260cc57838 Expose ApplicationSetting visibility settings as String
Use strings for the ApplicationSetting properties:
 - restricted_visibility_levels
 - default_project_visibility
 - default_snippet_visibility
 - default_group_visibility
2017-03-02 12:15:25 +01:00
Lin Jen-Shin 728b0a5fe0 Introduce DurationValidator, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9219#note_24032923
2017-02-24 17:28:24 +08:00
Lin Jen-Shin 83418ad846 Merge remote-tracking branch 'upstream/master' into 27762-add-default-artifacts-expiration
* upstream/master: (247 commits)
  Switched CONTRIBUTING.md style guide recommendation for method chaining
  Fix new offenses
  Stylistic tweaks
  Fix OAuth/SAML user blocking behavior
  Revert "Enable Style/DotPosition"
  Revert "Prefer leading style for Style/DotPosition"
  Revert "Enable Style/BarePercentLiterals"
  Manually correct autocorrect
  Move up delegate calls
  Exclude migrations from Style/MutableConstant
  ActiveSupport delegation is preferred over Forwardable
  Update haml_lint to work with newest rubocop
  Add explanations to cops
  Update rubocop and rubocop-rspec and regenerate .rubocop_todo.yml
  Update rubocop and rubocop-rspec and regenerate .rubocop_todo.yml
  Order cops alphabetically
  Don’t exclude some file in lib from rubocop
  Fix new offenses
  Enable Rails/Delegate
  Enable Style/WordArray
  ...
2017-02-24 17:14:35 +08:00
Douwe Maan b7d8df503c Enable Style/MutableConstant 2017-02-23 09:31:56 -06:00
Lin Jen-Shin 2b0426a497 Fix tests due to error key changed 2017-02-21 18:46:52 +08:00
Lin Jen-Shin 962f9efeb4 Update error message and check with presence: true
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9219#note_23762243
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9219#note_23762268
2017-02-21 02:25:35 +08:00
Lin Jen-Shin eede4ab1a2 0 for unlimited, disallow blank, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/issues/27762#note_23520780
2017-02-16 23:40:13 +08:00
Lin Jen-Shin 37cc3aaefb The exception was no longer used 2017-02-16 22:29:29 +08:00
Lin Jen-Shin 36afa43e4d Use squish to also compact the string
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9219#note_23436980
2017-02-16 19:33:30 +08:00
Lin Jen-Shin 46082f4b65 Use static error message and don't give booleans
in validation. Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9219#note_23437431
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9219#note_23437868
2017-02-16 19:30:32 +08:00
Lin Jen-Shin b72f00c7cf Update docs to reflect current behaviour 2017-02-15 16:03:58 +08:00
Lin Jen-Shin cfd839d6f5 Fix tests and disallow 0 to make it consistent with .gitlab-ci.yml 2017-02-15 15:31:51 +08:00
Lin Jen-Shin 602f3b84c0 Add a few more tests and make sure empty value sets to nil 2017-02-15 15:31:51 +08:00
Lin Jen-Shin 4eff5eb89f Check default_artifacts_expire_in only if existed 2017-02-15 15:31:51 +08:00
Lin Jen-Shin 53c94f9ea2 Use the same syntax for default expiration
Feedback:

* https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9219#note_23343951
* https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9219#note_23344036
* https://gitlab.com/gitlab-org/gitlab-ce/issues/27762#note_23344797
2017-02-15 15:31:51 +08:00
Lin Jen-Shin d2d30cff55 Initial implementation for default artifacts expiration
TODO: Add tests and screenshots
2017-02-15 15:31:51 +08:00
Z.J. van de Weg 128b1eae09 Update Rubocop to ruby 2.3 2017-02-07 15:16:46 +01:00
Adam Niedzielski 5d3816652e Introduce maximum session time for terminal websocket connection
Store the value in application settings.
Expose the value to Workhorse.
2017-02-06 11:49:30 +01:00
Mike Greiling 7e51cd32d3 update scripts and docs to reference the newly namespaced rake task 2017-01-27 15:23:09 -06:00
Rémy Coutable c446cfcbae Move ApplicationSetting DEFAULTS to `.defaults` instead
This will avoid autoloading issues in the long term.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-27 16:16:55 +01:00
Rémy Coutable e745e1aae0 Move a begin/rescue clause to ApplicationSetting.expire
Also, remove non-existing Ci::ApplicationSetting.expire!

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-27 16:16:55 +01:00
Grzegorz Bizon 632c2939bb Revert "Merge branch 'revert-9cac0317' into 'master' "
This reverts commit c20934869f, reversing
changes made to 4b7ec44b91.
2017-01-23 16:35:24 +01:00
Grzegorz Bizon baeaa97ef4 Revert "Merge branch 'dont-persist-application-settings-in-test-env' into 'master'"
This reverts merge request !8573
2017-01-21 22:55:35 +00:00
Stan Hu 8dbac708dc Revert "Merge branch 'backport-fix-load-error' into 'master'"
This reverts merge request !8671
2017-01-21 00:37:04 +00:00
Rémy Coutable aaa986c0d2
Don't define ApplicationSetting defaults in a constant
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-20 20:10:15 +01:00
Rémy Coutable b038c53073 Move default values to ApplicationSetting::DEFAULTS and use it in CurrentSettings
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-15 01:07:29 -05:00