Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Greenlight
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arbeitsgruppe Hardwarenahe IT-Systeme
Greenlight
Commits
479c8397
Unverified
Commit
479c8397
authored
Oct 27, 2022
by
Hadi Cheaito
Committed by
GitHub
Oct 27, 2022
Browse files
Options
Downloads
Patches
Plain Diff
Adding email and role column search (#4036)
parent
044009b7
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/models/user.rb
+1
-1
1 addition, 1 deletion
app/models/user.rb
with
1 addition
and
1 deletion
app/models/user.rb
+
1
−
1
View file @
479c8397
...
...
@@ -55,7 +55,7 @@ class User < ApplicationRecord
scope
:with_provider
,
->
(
current_provider
)
{
where
(
provider:
current_provider
)
}
def
self
.
search
(
input
)
return
where
(
'users.name ILIKE
?'
,
"%
#{
input
}
%"
)
if
input
return
joins
(
:role
).
where
(
'users.name ILIKE
:input OR users.email ILIKE :input OR roles.name ILIKE :input'
,
input:
"%
#{
input
}
%"
)
if
input
all
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment