diff options
author | Rémy Coutable <remy@rymai.me> | 2016-06-17 16:33:37 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-06-18 05:46:45 +0200 |
commit | a08a26ac814d7fd9f7523e22847fab0cc25ceb78 (patch) | |
tree | a0b7594e3b12d14cdd1e80adf893c79455d605bf /app | |
parent | 724f986fb2cf8fee3606bffd01da9842634400ef (diff) | |
download | gitlab-ce-a08a26ac814d7fd9f7523e22847fab0cc25ceb78.tar.gz |
Don't send the "access declined" email on access request withdrawal
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app')
-rw-r--r-- | app/services/members/destroy_service.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/services/members/destroy_service.rb b/app/services/members/destroy_service.rb index e32eb47b846..59a55e42e38 100644 --- a/app/services/members/destroy_service.rb +++ b/app/services/members/destroy_service.rb @@ -10,7 +10,9 @@ module Members if can?(current_user, "destroy_#{member.type.underscore}".to_sym, member) member.destroy - notification_service.decline_access_request(member) if member.request? + if member.request? && member.user != current_user + notification_service.decline_access_request(member) + end end member |