summaryrefslogtreecommitdiff
path: root/app/models/hooks
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-10-08 16:03:07 +0100
committerNick Thomas <nick@gitlab.com>2018-10-09 11:15:02 +0100
commitff9881d99193bd64d112bb03311aecd75f4270ae (patch)
treea5e336ea308e89f71c0e41cdeccedb47eef59337 /app/models/hooks
parentc616327c1221dc91318a35769e01ab6932d497ea (diff)
downloadgitlab-ce-ff9881d99193bd64d112bb03311aecd75f4270ae.tar.gz
Remove unencrypted webhook token and URL columns
Diffstat (limited to 'app/models/hooks')
-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