diff options
author | Rémy Coutable <remy@rymai.me> | 2016-10-03 19:43:33 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-10-03 19:43:33 +0300 |
commit | 1592d57c18ba905d7bd1643ab6af56c902d709c1 (patch) | |
tree | 7d1434df066344ff0cb66ffb069e393f683e8786 /lib | |
parent | e9d7b4f765605cfe25c2c4d8729e3d34cf5a979b (diff) |
Remove useless code now that Member#add_user handles it
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/members.rb | 8 |
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 |