diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /app/models/deploy_token.rb | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
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 |