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
path: root/app
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-10-08 18:03:07 +0300
committerNick Thomas <nick@gitlab.com>2018-10-09 13:15:02 +0300
commitff9881d99193bd64d112bb03311aecd75f4270ae (patch)
treea5e336ea308e89f71c0e41cdeccedb47eef59337 /app
parentc616327c1221dc91318a35769e01ab6932d497ea (diff)
Remove unencrypted webhook token and URL columns
Diffstat (limited to 'app')
-rw-r--r--app/models/hooks/web_hook.rb34
1 files changed, 0 insertions, 34 deletions
diff --git a/app/models/hooks/web_hook.rb b/app/models/hooks/web_hook.rb
index 68ba4b213b2..b2fb79bc7ed 100644
--- a/app/models/hooks/web_hook.rb
+++ b/app/models/hooks/web_hook.rb
@@ -37,38 +37,4 @@ class WebHook < ActiveRecord::Base
def allow_local_requests?
false
end
-
- # In 11.4, the web_hooks table has both `token` and `encrypted_token` fields.
- # Ensure that the encrypted version always takes precedence if present.
- alias_method :attr_encrypted_token, :token
- def token
- attr_encrypted_token.presence || read_attribute(:token)
- end
-
- # In 11.4, the web_hooks table has both `token` and `encrypted_token` fields.
- # Pending a background migration to encrypt all fields, we should just clear
- # the unencrypted value whenever the new value is set.
- alias_method :'attr_encrypted_token=', :'token='
- def token=(value)
- self.attr_encrypted_token = value
-
- write_attribute(:token, nil)
- end
-
- # In 11.4, the web_hooks table has both `url` and `encrypted_url` fields.
- # Ensure that the encrypted version always takes precedence if present.
- alias_method :attr_encrypted_url, :url
- def url
- attr_encrypted_url.presence || read_attribute(:url)
- end
-
- # In 11.4, the web_hooks table has both `url` and `encrypted_url` fields.
- # Pending a background migration to encrypt all fields, we should just clear
- # the unencrypted value whenever the new value is set.
- alias_method :'attr_encrypted_url=', :'url='
- def url=(value)
- self.attr_encrypted_url = value
-
- write_attribute(:url, nil)
- end
end