summaryrefslogtreecommitdiff
path: root/app/models/members
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-04-10 16:37:02 +0200
committerDouwe Maan <douwe@gitlab.com>2015-04-14 12:08:11 +0200
commite50556fcc8d81dae5978bcb3e1dd5104789aab0f (patch)
tree000c94f5da8061efa360c0e580e77261de84e8b1 /app/models/members
parent8949af0c9f2aa90b979043a0a6ee264ac0c036b9 (diff)
downloadgitlab-ce-e50556fcc8d81dae5978bcb3e1dd5104789aab0f.tar.gz
Let invites be declined.
Diffstat (limited to 'app/models/members')
-rw-r--r--app/models/members/group_member.rb6
-rw-r--r--app/models/members/project_member.rb6
2 files changed, 12 insertions, 0 deletions
diff --git a/app/models/members/group_member.rb b/app/models/members/group_member.rb
index 68b7c169f72..84c91372b3f 100644
--- a/app/models/members/group_member.rb
+++ b/app/models/members/group_member.rb
@@ -66,4 +66,10 @@ class GroupMember < Member
super
end
+
+ def after_decline_invite
+ notification_service.decline_group_invite(self)
+
+ super
+ end
end
diff --git a/app/models/members/project_member.rb b/app/models/members/project_member.rb
index 3b3b1bd4680..8af7499dd82 100644
--- a/app/models/members/project_member.rb
+++ b/app/models/members/project_member.rb
@@ -167,6 +167,12 @@ class ProjectMember < Member
super
end
+ def after_decline_invite
+ notification_service.decline_project_invite(self)
+
+ super
+ end
+
def event_service
EventCreateService.new
end