diff options
Diffstat (limited to 'app/models/deploy_token.rb')
-rw-r--r-- | app/models/deploy_token.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/models/deploy_token.rb b/app/models/deploy_token.rb index 360a9ffbc53..3c0f7d91a03 100644 --- a/app/models/deploy_token.rb +++ b/app/models/deploy_token.rb @@ -5,7 +5,11 @@ class DeployToken < ApplicationRecord include TokenAuthenticatable include PolicyActor include Gitlab::Utils::StrongMemoize - add_authentication_token_field :token, encrypted: :optional + include IgnorableColumns + + ignore_column :token, remove_with: '15.2', remove_after: '2022-07-22' + + add_authentication_token_field :token, encrypted: :required AVAILABLE_SCOPES = %i(read_repository read_registry write_registry read_package_registry write_package_registry).freeze @@ -126,6 +130,10 @@ class DeployToken < ApplicationRecord end end + def impersonated? + false + end + def expires_at expires_at = read_attribute(:expires_at) expires_at != Forever.date ? expires_at : nil |