You need to sign in or sign up before continuing.
Move all EE finder differences to EE specific modules
EE specific code that resides in app/finders
should be moved to the corresponding EE specific modules that reside in ee/app/finders
, leaving behind only the necessary prepend
and include
calls, which should be placed at the end of the file).
Differences
app/finders/users_finder.rb
diff --git a/home/yorickpeterse/Projects/gitlab/gdk-ce/gitlab/app/finders/users_finder.rb b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/app/finders/users_finder.rb
index 81ae50c0bd1..f6a16507057 100644
--- a/home/yorickpeterse/Projects/gitlab/gdk-ce/gitlab/app/finders/users_finder.rb
+++ b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/app/finders/users_finder.rb
@@ -14,6 +14,7 @@
# active: boolean
# blocked: boolean
# external: boolean
+# skip_ldap: boolean
#
class UsersFinder
include CreatedAtFilter
@@ -37,6 +38,7 @@ class UsersFinder
users = by_2fa(users)
users = by_created_at(users)
users = by_custom_attributes(users)
+ users = by_non_ldap(users)
users
end
@@ -84,6 +86,12 @@ 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'