summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-06-17 16:33:37 +0200
committerRémy Coutable <remy@rymai.me>2016-06-18 05:46:45 +0200
commita08a26ac814d7fd9f7523e22847fab0cc25ceb78 (patch)
treea0b7594e3b12d14cdd1e80adf893c79455d605bf /app
parent724f986fb2cf8fee3606bffd01da9842634400ef (diff)
downloadgitlab-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.rb4
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