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:
authorRémy Coutable <remy@rymai.me>2018-10-09 19:17:09 +0300
committerRémy Coutable <remy@rymai.me>2018-10-09 19:17:09 +0300
commit1ac2a3b379cad39e9b81f34bd43093a1d9af512a (patch)
tree22974f8c3bc017494b38e0e6e3fdcde8abbbe13d /app
parent55bd24e4a42f5bd62e46a2a025aaafc764dd0b73 (diff)
parentff9881d99193bd64d112bb03311aecd75f4270ae (diff)
Merge branch '52367-cleanup-web-hooks-columns' into 'master'
Remove unencrypted webhook token and URL columns Closes #52367 See merge request gitlab-org/gitlab-ce!22199
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