summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-11-05 13:28:16 +0000
committerSean McGivern <sean@mcgivern.me.uk>2018-11-05 13:28:16 +0000
commitc12a4a9ac7c04a215adf6062fec7bf31231c7d4a (patch)
treed7734c7f25d581744921e5e245661bad498b8251 /lib
parent19c5468a2788c8fd07a403997846712413324e75 (diff)
parent8d900ade3832b3e2812f067ace19bad7fd286d54 (diff)
downloadgitlab-ce-c12a4a9ac7c04a215adf6062fec7bf31231c7d4a.tar.gz
Merge branch 'use_tokenauthenticatable_method_for_token_lookup' into 'master'
Remove PersonalAccessTokensFinder#find_by method See merge request gitlab-org/gitlab-ce!22617
Diffstat (limited to 'lib')
-rw-r--r--lib/api/users.rb4
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! }