summaryrefslogtreecommitdiff
path: root/app/finders/autocomplete/users_finder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/finders/autocomplete/users_finder.rb')
-rw-r--r--app/finders/autocomplete/users_finder.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/finders/autocomplete/users_finder.rb b/app/finders/autocomplete/users_finder.rb
index b2557469079..e2283f3266e 100644
--- a/app/finders/autocomplete/users_finder.rb
+++ b/app/finders/autocomplete/users_finder.rb
@@ -44,6 +44,7 @@ module Autocomplete
# Returns the users based on the input parameters, as an Array.
#
# This method is separate so it is easier to extend in EE.
+ # rubocop: disable CodeReuse/ActiveRecord
def limited_users
# When changing the order of these method calls, make sure that
# reorder_by_name() is called _before_ optionally_search(), otherwise
@@ -61,6 +62,7 @@ module Autocomplete
.limit(LIMIT)
.to_a
end
+ # rubocop: enable CodeReuse/ActiveRecord
def prepend_current_user?
filter_by_current_user.present? && current_user
@@ -70,6 +72,7 @@ module Autocomplete
author_id.present? && current_user
end
+ # rubocop: disable CodeReuse/ActiveRecord
def find_users
if project
project.authorized_users.union_with_user(author_id)
@@ -81,5 +84,6 @@ module Autocomplete
User.none
end
end
+ # rubocop: enable CodeReuse/ActiveRecord
end
end