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
7ded7c17
Commit
7ded7c17
authored
Oct 20, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update project member controller to match recent master logic
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
f5659ac4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
project_members_controller.rb
app/controllers/projects/project_members_controller.rb
+7
-9
No files found.
app/controllers/projects/project_members_controller.rb
View file @
7ded7c17
...
@@ -25,18 +25,16 @@ class Projects::ProjectMembersController < Projects::ApplicationController
...
@@ -25,18 +25,16 @@ class Projects::ProjectMembersController < Projects::ApplicationController
end
end
def
create
def
create
if
params
[
:user_ids
].
blank?
&&
params
[
:group_ids
].
blank?
if
params
[
:user_ids
].
blank?
return
redirect_to
(
namespace_project_project_members_path
(
@project
.
namespace
,
@project
),
alert:
'No users or groups specified.'
)
return
redirect_to
(
namespace_project_project_members_path
(
@project
.
namespace
,
@project
),
alert:
'No users or groups specified.'
)
end
end
if
params
[
:user_ids
].
present?
@project
.
team
.
add_users
(
@project
.
team
.
add_users
(
params
[
:user_ids
].
split
(
','
),
params
[
:user_ids
].
split
(
','
),
params
[
:access_level
],
params
[
:access_level
],
expires_at:
params
[
:expires_at
],
expires_at:
params
[
:expires_at
],
current_user:
current_user
current_user:
current_user
)
)
end
redirect_to
namespace_project_project_members_path
(
@project
.
namespace
,
@project
),
notice:
'Users were successfully added.'
redirect_to
namespace_project_project_members_path
(
@project
.
namespace
,
@project
),
notice:
'Users were successfully added.'
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