Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7c5643ee
Commit
7c5643ee
authored
Nov 28, 2018
by
George Tsiolis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move EE only differences for finders
parent
e9d0bd8e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
8 deletions
+25
-8
app/finders/users_finder.rb
app/finders/users_finder.rb
+2
-8
ee/app/finders/ee/users_finder.rb
ee/app/finders/ee/users_finder.rb
+18
-0
ee/changelogs/unreleased/gt-move-ee-only-differences-for-finders.yml
...gs/unreleased/gt-move-ee-only-differences-for-finders.yml
+5
-0
No files found.
app/finders/users_finder.rb
View file @
7c5643ee
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
# active: boolean
# active: boolean
# blocked: boolean
# blocked: boolean
# external: boolean
# external: boolean
# skip_ldap: boolean
#
#
class
UsersFinder
class
UsersFinder
include
CreatedAtFilter
include
CreatedAtFilter
...
@@ -38,7 +37,6 @@ class UsersFinder
...
@@ -38,7 +37,6 @@ class UsersFinder
users
=
by_2fa
(
users
)
users
=
by_2fa
(
users
)
users
=
by_created_at
(
users
)
users
=
by_created_at
(
users
)
users
=
by_custom_attributes
(
users
)
users
=
by_custom_attributes
(
users
)
users
=
by_non_ldap
(
users
)
users
users
end
end
...
@@ -86,12 +84,6 @@ class UsersFinder
...
@@ -86,12 +84,6 @@ class UsersFinder
end
end
# rubocop: enable CodeReuse/ActiveRecord
# rubocop: enable CodeReuse/ActiveRecord
def
by_non_ldap
(
users
)
return
users
unless
params
[
:skip_ldap
]
users
.
non_ldap
end
def
by_2fa
(
users
)
def
by_2fa
(
users
)
case
params
[
:two_factor
]
case
params
[
:two_factor
]
when
'enabled'
when
'enabled'
...
@@ -103,3 +95,5 @@ class UsersFinder
...
@@ -103,3 +95,5 @@ class UsersFinder
end
end
end
end
end
end
UsersFinder
.
prepend
(
EE
::
UsersFinder
)
ee/app/finders/ee/users_finder.rb
0 → 100644
View file @
7c5643ee
# 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
ee/changelogs/unreleased/gt-move-ee-only-differences-for-finders.yml
0 → 100644
View file @
7c5643ee
---
title
:
Move EE only differences for finders
merge_request
:
8629
author
:
George Tsiolis
type
:
other
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment