summaryrefslogtreecommitdiff
path: root/app/finders/users_finder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/finders/users_finder.rb')
-rw-r--r--app/finders/users_finder.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/finders/users_finder.rb b/app/finders/users_finder.rb
index f87e0c67604..cc94536bf79 100644
--- a/app/finders/users_finder.rb
+++ b/app/finders/users_finder.rb
@@ -17,6 +17,7 @@
# without_projects: boolean
# sort: string
# id: integer
+# non_internal: boolean
#
class UsersFinder
include CreatedAtFilter
@@ -42,6 +43,7 @@ class UsersFinder
users = by_created_at(users)
users = by_without_projects(users)
users = by_custom_attributes(users)
+ users = by_non_internal(users)
order(users)
end
@@ -112,6 +114,12 @@ class UsersFinder
users.without_projects
end
+ def by_non_internal(users)
+ return users unless params[:non_internal]
+
+ users.non_internal
+ end
+
# rubocop: disable CodeReuse/ActiveRecord
def order(users)
return users unless params[:sort]