diff options
Diffstat (limited to 'app/models/deploy_token.rb')
-rw-r--r-- | app/models/deploy_token.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/deploy_token.rb b/app/models/deploy_token.rb index 326d3fb8470..360a9ffbc53 100644 --- a/app/models/deploy_token.rb +++ b/app/models/deploy_token.rb @@ -14,6 +14,11 @@ class DeployToken < ApplicationRecord default_value_for(:expires_at) { Forever.date } + # Do NOT use this `user` for the authentication/authorization of the deploy tokens. + # It's for the auditing purpose on Credential Inventory, only. + # See https://gitlab.com/gitlab-org/gitlab/-/issues/353467#note_859774246 for more information. + belongs_to :user, foreign_key: :creator_id, optional: true + has_many :project_deploy_tokens, inverse_of: :deploy_token has_many :projects, through: :project_deploy_tokens |