Commit 9a072f9b authored by Yorick Peterse's avatar Yorick Peterse

Merge branch 'gt-move-ee-only-differences-for-finders' into 'master'

Move EE only differences for finders

Closes #8599

See merge request gitlab-org/gitlab-ee!8629
parents 1f5d50b1 7c5643ee
......@@ -14,7 +14,6 @@
# active: boolean
# blocked: boolean
# external: boolean
# skip_ldap: boolean
#
class UsersFinder
include CreatedAtFilter
......@@ -38,7 +37,6 @@ class UsersFinder
users = by_2fa(users)
users = by_created_at(users)
users = by_custom_attributes(users)
users = by_non_ldap(users)
users
end
......@@ -86,12 +84,6 @@ class UsersFinder
end
# rubocop: enable CodeReuse/ActiveRecord
def by_non_ldap(users)
return users unless params[:skip_ldap]
users.non_ldap
end
def by_2fa(users)
case params[:two_factor]
when 'enabled'
......@@ -103,3 +95,5 @@ class UsersFinder
end
end
end
UsersFinder.prepend(EE::UsersFinder)
# frozen_string_literal: true
module EE
module UsersFinder
extend ::Gitlab::Utils::Override
override :execute
def execute
by_non_ldap(super)
end
def by_non_ldap(users)
return users unless params[:skip_ldap]
users.non_ldap
end
end
end
---
title: Move EE only differences for finders
merge_request: 8629
author: George Tsiolis
type: other
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment