BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
5b52adce
Unverified
Commit
5b52adce
authored
Mar 09, 2017
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix group members method for project import/export
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
26f28f96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
project_tree_saver.rb
lib/gitlab/import_export/project_tree_saver.rb
+7
-1
No files found.
lib/gitlab/import_export/project_tree_saver.rb
View file @
5b52adce
...
...
@@ -47,7 +47,13 @@ module Gitlab
def
group_members
return
[]
unless
@current_user
.
can?
(
:admin_group
,
@project
.
group
)
MembersFinder
.
new
(
@project
.
project_members
,
@project
.
group
).
execute
(
@current_user
)
# We need `.where.not(user_id: nil)` here otherwise when a group has an
# invitee, it would make the following query return 0 rows since a NULL
# user_id would be present in the subquery
# See http://stackoverflow.com/questions/129077/not-in-clause-and-null-values
non_null_user_ids
=
@project
.
project_members
.
where
.
not
(
user_id:
nil
).
select
(
:user_id
)
GroupMembersFinder
.
new
(
@project
.
group
).
execute
.
where
.
not
(
user_id:
non_null_user_ids
)
end
end
end
...
...
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