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
Boxiang Sun
gitlab-ce
Commits
401b7976
Commit
401b7976
authored
Sep 06, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug when group_ids not present when creating
parent
2b41db92
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
app/controllers/projects/project_members_controller.rb
app/controllers/projects/project_members_controller.rb
+11
-9
No files found.
app/controllers/projects/project_members_controller.rb
View file @
401b7976
...
...
@@ -55,15 +55,17 @@ class Projects::ProjectMembersController < Projects::ApplicationController
current_user:
current_user
)
group_ids
=
params
[
:group_ids
].
split
(
','
)
groups
=
Group
.
where
(
id:
group_ids
)
groups
.
each
do
|
group
|
project
.
project_group_links
.
create
(
group:
group
,
group_access:
params
[
:access_level
],
expires_at:
params
[
:expires_at
]
)
if
params
[
:group_ids
].
present?
group_ids
=
params
[
:group_ids
].
split
(
','
)
groups
=
Group
.
where
(
id:
group_ids
)
groups
.
each
do
|
group
|
project
.
project_group_links
.
create
(
group:
group
,
group_access:
params
[
:access_level
],
expires_at:
params
[
:expires_at
]
)
end
end
redirect_to
namespace_project_project_members_path
(
@project
.
namespace
,
@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