summaryrefslogtreecommitdiff
path: root/app/validators
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2019-02-19 10:55:13 +1300
committerThong Kuah <tkuah@gitlab.com>2019-02-19 22:04:08 +1300
commit8a1b6041c8af7007c80de87221e20512810be26d (patch)
treeb02ed1a336400b64f26060e30c77162e568a0e68 /app/validators
parentfe10964a6884162b9272ec3a32a5736c2a997ab2 (diff)
downloadgitlab-ce-8a1b6041c8af7007c80de87221e20512810be26d.tar.gz
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