diff options
author | Steve Azzopardi <steveazz@outlook.com> | 2018-11-08 09:02:16 +0100 |
---|---|---|
committer | Steve Azzopardi <steveazz@outlook.com> | 2018-11-08 09:02:16 +0100 |
commit | 7a6cae01c80dda564726ef363191b09d359ec2ba (patch) | |
tree | 6f526b998098cd43ce88087467923991735d3c6a /lib/api/users.rb | |
parent | 7c4546a1161cd4cd5371f988f62c2e11812e54e6 (diff) | |
parent | 15e519451e843b6d55a2c35bbefe039003b15c25 (diff) | |
download | gitlab-ce-7a6cae01c80dda564726ef363191b09d359ec2ba.tar.gz |
Merge branch 'master' into 11-5-stable-prepare-rc4
Diffstat (limited to 'lib/api/users.rb')
-rw-r--r-- | lib/api/users.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb index 47382b09207..2a56506f3a5 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -512,11 +512,9 @@ module API PersonalAccessTokensFinder.new({ user: user, impersonation: true }.merge(options)) end - # rubocop: disable CodeReuse/ActiveRecord def find_impersonation_token - finder.find_by(id: declared_params[:impersonation_token_id]) || not_found!('Impersonation Token') + finder.find_by_id(declared_params[:impersonation_token_id]) || not_found!('Impersonation Token') end - # rubocop: enable CodeReuse/ActiveRecord end before { authenticated_as_admin! } |