summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-10-03 18:43:33 +0200
committerRémy Coutable <remy@rymai.me>2016-10-03 18:43:33 +0200
commit1592d57c18ba905d7bd1643ab6af56c902d709c1 (patch)
tree7d1434df066344ff0cb66ffb069e393f683e8786
parente9d7b4f765605cfe25c2c4d8729e3d34cf5a979b (diff)
downloadgitlab-ce-rc-improve-members-destroy-service.tar.gz
Remove useless code now that Member#add_user handles itrc-improve-members-destroy-service
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r--lib/api/members.rb8
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/api/members.rb b/lib/api/members.rb
index 03dbf4eabb8..34df55fe192 100644
--- a/lib/api/members.rb
+++ b/lib/api/members.rb
@@ -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