Updated call to find deploy token
This commit is contained in:
parent
a6b60fee67
commit
84d6dcbe50
2 changed files with 3 additions and 3 deletions
|
@ -202,8 +202,7 @@ module Gitlab
|
|||
def deploy_token_check(login, password)
|
||||
return unless password.present?
|
||||
|
||||
token =
|
||||
DeployToken.active.find_by(token: password)
|
||||
token = DeployToken.active.find_by_token(password)
|
||||
|
||||
return unless token && login
|
||||
return if login != token.username
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
|
||||
FactoryBot.define do
|
||||
factory :deploy_token do
|
||||
token { SecureRandom.hex(50) }
|
||||
token nil
|
||||
token_encrypted { Gitlab::CryptoHelper.aes256_gcm_encrypt( SecureRandom.hex(50) ) }
|
||||
sequence(:name) { |n| "PDT #{n}" }
|
||||
read_repository true
|
||||
read_registry true
|
||||
|
|
Loading…
Reference in a new issue