diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 04:45:44 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 04:45:44 +0300 |
commit | 85dc423f7090da0a52c73eb66faf22ddb20efff9 (patch) | |
tree | 9160f299afd8c80c038f08e1545be119f5e3f1e1 /app/finders/users_finder.rb | |
parent | 15c2c8c66dbe422588e5411eee7e68f1fa440bb8 (diff) |
Add latest changes from gitlab-org/gitlab@13-4-stable-ee
Diffstat (limited to 'app/finders/users_finder.rb')
-rw-r--r-- | app/finders/users_finder.rb | 8 |
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] |