diff options
author | Thong Kuah <tkuah@gitlab.com> | 2019-02-19 00:55:13 +0300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2019-02-19 12:04:08 +0300 |
commit | 8a1b6041c8af7007c80de87221e20512810be26d (patch) | |
tree | b02ed1a336400b64f26060e30c77162e568a0e68 /app | |
parent | fe10964a6884162b9272ec3a32a5736c2a997ab2 (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')
-rw-r--r-- | app/validators/url_validator.rb | 2 |
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 |