Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2019-02-19 00:55:13 +0300
committerThong Kuah <tkuah@gitlab.com>2019-02-19 12:04:08 +0300
commit8a1b6041c8af7007c80de87221e20512810be26d (patch)
treeb02ed1a336400b64f26060e30c77162e568a0e68 /app/validators
parentfe10964a6884162b9272ec3a32a5736c2a997ab2 (diff)
Use Gitlab::CurrentSettings in UrlValidator
Gitlab::CurrentSettings will create ApplicationSetting.current if not present which means we don't have to use `&.`. We can also more easily use stub_application_setting in specs
Diffstat (limited to 'app/validators')
-rw-r--r--app/validators/url_validator.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/validators/url_validator.rb b/app/validators/url_validator.rb
index d3e32818dc7..c85f5ba5cdb 100644
--- a/app/validators/url_validator.rb
+++ b/app/validators/url_validator.rb
@@ -93,6 +93,6 @@ class UrlValidator < ActiveModel::EachValidator
end
def allow_setting_local_requests?
- ApplicationSetting.current&.allow_local_requests_from_hooks_and_services?
+ Gitlab::CurrentSettings.allow_local_requests_from_hooks_and_services?
end
end