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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arbeitsgruppe Hardwarenahe IT-Systeme
Greenlight
Commits
84a5db03
Unverified
Commit
84a5db03
authored
2 years ago
by
Ahmad Farhat
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Stopped email search on shared users (#4777)
parent
45e6332d
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/controllers/api/v1/shared_accesses_controller.rb
+1
-1
1 addition, 1 deletion
app/controllers/api/v1/shared_accesses_controller.rb
app/models/user.rb
+6
-0
6 additions, 0 deletions
app/models/user.rb
with
7 additions
and
1 deletion
app/controllers/api/v1/shared_accesses_controller.rb
+
1
−
1
View file @
84a5db03
...
@@ -50,7 +50,7 @@ module Api
...
@@ -50,7 +50,7 @@ module Api
shareable_users
=
User
.
with_attached_avatar
shareable_users
=
User
.
with_attached_avatar
.
where
.
not
(
id:
[
@room
.
shared_users
.
pluck
(
:id
)
<<
@room
.
user_id
])
.
where
.
not
(
id:
[
@room
.
shared_users
.
pluck
(
:id
)
<<
@room
.
user_id
])
.
where
(
role_id:
[
role_ids
])
.
where
(
role_id:
[
role_ids
])
.
search
(
params
[
:search
])
.
name_
search
(
params
[
:search
])
render_data
data:
shareable_users
,
serializer:
SharedAccessSerializer
,
status: :ok
render_data
data:
shareable_users
,
serializer:
SharedAccessSerializer
,
status: :ok
end
end
...
...
This diff is collapsed.
Click to expand it.
app/models/user.rb
+
6
−
0
View file @
84a5db03
...
@@ -65,6 +65,12 @@ class User < ApplicationRecord
...
@@ -65,6 +65,12 @@ class User < ApplicationRecord
all
all
end
end
def
self
.
name_search
(
input
)
return
where
(
'users.name ILIKE :input'
,
input:
"%
#{
input
}
%"
)
if
input
all
end
# Verifies the token existence, fetches its user and validates its expiration
# Verifies the token existence, fetches its user and validates its expiration
# and invalidates the user token if expired.
# and invalidates the user token if expired.
...
...
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