Commit 1592d57c authored by Rémy Coutable's avatar Rémy Coutable

Remove useless code now that Member#add_user handles it

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent e9d7b4f7
......@@ -65,14 +65,6 @@ module API
# for both project and group members in 9.0!
conflict!('Member already exists') if source_type == 'group' && member
access_requester = source.requesters.find_by(user_id: params[:user_id])
if access_requester
# We delete a potential access requester before creating the new member.
# We pass current_user = access_requester so that the requester doesn't
# receive a "access denied" email.
::Members::DestroyService.new(source, access_requester.user, params).execute(:requesters)
end
unless member
member = source.add_user(params[:user_id], params[:access_level], current_user: current_user, expires_at: params[:expires_at])
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