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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
931d09f4
Commit
931d09f4
authored
Sep 02, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed search
parent
3e19f197
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
app/controllers/projects/project_members_controller.rb
app/controllers/projects/project_members_controller.rb
+15
-6
No files found.
app/controllers/projects/project_members_controller.rb
View file @
931d09f4
...
@@ -10,21 +10,30 @@ class Projects::ProjectMembersController < Projects::ApplicationController
...
@@ -10,21 +10,30 @@ class Projects::ProjectMembersController < Projects::ApplicationController
members
=
[]
members
=
[]
project_members
=
@project
.
project_members
project_members
=
@project
.
project_members
project_members
=
project_members
.
non_invite
unless
can?
(
current_user
,
:admin_project
,
@project
)
project_members
=
project_members
.
non_invite
unless
can?
(
current_user
,
:admin_project
,
@project
)
if
params
[
:search
].
present?
users
=
@project
.
users
.
search
(
params
[
:search
]).
to_a
project_members
=
project_members
.
where
(
user_id:
users
)
end
members
<<
project_members
.
pluck
(
:id
)
members
<<
project_members
.
pluck
(
:id
)
if
@project
.
group
@group
=
@project
.
group
group_members
=
@project
.
group
.
group_members
if
@group
group_members
=
@group
.
group_members
group_members
=
group_members
.
non_invite
unless
can?
(
current_user
,
:admin_project
,
@project
)
group_members
=
group_members
.
non_invite
unless
can?
(
current_user
,
:admin_project
,
@project
)
if
params
[
:search
].
present?
users
=
@group
.
users
.
search
(
params
[
:search
]).
to_a
group_members
=
group_members
.
where
(
user_id:
users
)
end
members
<<
group_members
.
pluck
(
:id
)
members
<<
group_members
.
pluck
(
:id
)
end
end
@project_members
=
Member
.
where
(
id:
members
)
@project_members
=
Member
.
where
(
id:
members
)
@project_members_size
=
@project_members
.
size
@project_members_size
=
@project_members
.
size
if
params
[
:search
].
present?
@project_members
=
@project_members
.
search
(
params
[
:search
])
end
@project_members
=
@project_members
.
page
(
params
[
:page
])
@project_members
=
@project_members
.
page
(
params
[
:page
])
@requesters
=
@project
.
requesters
if
can?
(
current_user
,
:admin_project
,
@project
)
@requesters
=
@project
.
requesters
if
can?
(
current_user
,
:admin_project
,
@project
)
...
...
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