diff options
author | Rémy Coutable <remy@rymai.me> | 2016-12-13 15:53:00 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-12-13 15:53:00 +0100 |
commit | d95b709a66a5597dced25a2b9df9a1e24fc6d49a (patch) | |
tree | 996f7de7904424329c246d256ab588e1e844e09b /app/models | |
parent | 2f45d3bcf0f28d4cd4124b4c9722edc1d3085201 (diff) | |
download | gitlab-ce-d95b709a66a5597dced25a2b9df9a1e24fc6d49a.tar.gz |
Be smarter when finding a sudoed user in API::Helpers25482-fix-api-sudo
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/user.rb | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index b9bb4a9e3f7..1bd28203523 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -304,10 +304,6 @@ class User < ActiveRecord::Base personal_access_token.user if personal_access_token end - def by_username_or_id(name_or_id) - find_by('users.username = ? OR users.id = ?', name_or_id.to_s, name_or_id.to_i) - end - # Returns a user for the given SSH key. def find_by_ssh_key_id(key_id) find_by(id: Key.unscoped.select(:user_id).where(id: key_id)) |