diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-15 12:09:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-15 12:09:46 +0300 |
commit | 221b529789f4090341a825695aeb49b8df6dd11d (patch) | |
tree | c8843e4ca5ef1034752eb68712fcf338b24950db /app/finders | |
parent | 00a8c64ffd18e74df4b1cdeda7776b5221fddafe (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/finders')
-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 d5650c6828d..ebb686c2aa7 100644 --- a/app/finders/users_finder.rb +++ b/app/finders/users_finder.rb @@ -14,6 +14,7 @@ # active: boolean # blocked: boolean # external: boolean +# without_projects: boolean # class UsersFinder include CreatedAtFilter @@ -36,6 +37,7 @@ class UsersFinder users = by_external(users) users = by_2fa(users) users = by_created_at(users) + users = by_without_projects(users) users = by_custom_attributes(users) users @@ -94,6 +96,12 @@ class UsersFinder users end end + + def by_without_projects(users) + return users unless params[:without_projects] + + users.without_projects + end end UsersFinder.prepend_if_ee('EE::UsersFinder') |