BigW Consortium Gitlab

Commit 7ded7c17 by Dmitriy Zaporozhets

Update project member controller to match recent master logic

parent f5659ac4
......@@ -25,18 +25,16 @@ class Projects::ProjectMembersController < Projects::ApplicationController
end
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.')
end
if params[:user_ids].present?
@project.team.add_users(
params[:user_ids].split(','),
params[:access_level],
expires_at: params[:expires_at],
current_user: current_user
)
end
redirect_to namespace_project_project_members_path(@project.namespace, @project), notice: 'Users were successfully added.'
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment