gitlab-org--gitlab-foss/app/services/members/create_service.rb

16 lines
328 B
Ruby

module Members
class CreateService < BaseService
def execute
return false if params[:user_ids].blank?
project.team.add_users(
params[:user_ids].split(','),
params[:access_level],
expires_at: params[:expires_at],
current_user: current_user
)
true
end
end
end