Commit b673ee77 authored by Robert Speicher's avatar Robert Speicher

Remove the skip_notification attribute from Member

Now that we use NullNotificationService for LDAP users, this attribute
is no longer necessary.
parent 7dab4bc5
...@@ -44,33 +44,33 @@ class GroupMember < Member ...@@ -44,33 +44,33 @@ class GroupMember < Member
private private
def send_invite def send_invite
run_after_commit_or_now { notification_service.invite_group_member(self, @raw_invite_token) } unless @skip_notification run_after_commit_or_now { notification_service.invite_group_member(self, @raw_invite_token) }
super super
end end
def post_create_hook def post_create_hook
run_after_commit_or_now { notification_service.new_group_member(self) } unless @skip_notification run_after_commit_or_now { notification_service.new_group_member(self) }
super super
end end
def post_update_hook def post_update_hook
if access_level_changed? if access_level_changed?
run_after_commit { notification_service.update_group_member(self) } unless @skip_notification run_after_commit { notification_service.update_group_member(self) }
end end
super super
end end
def after_accept_invite def after_accept_invite
notification_service.accept_group_invite(self) unless @skip_notification notification_service.accept_group_invite(self)
super super
end end
def after_decline_invite def after_decline_invite
notification_service.decline_group_invite(self) unless @skip_notification notification_service.decline_group_invite(self)
super super
end end
......
...@@ -101,7 +101,7 @@ class ProjectMember < Member ...@@ -101,7 +101,7 @@ class ProjectMember < Member
end end
def send_invite def send_invite
run_after_commit_or_now { notification_service.invite_project_member(self, @raw_invite_token) } unless @skip_notification run_after_commit_or_now { notification_service.invite_project_member(self, @raw_invite_token) }
super super
end end
...@@ -109,7 +109,7 @@ class ProjectMember < Member ...@@ -109,7 +109,7 @@ class ProjectMember < Member
def post_create_hook def post_create_hook
unless owner? unless owner?
event_service.join_project(self.project, self.user) event_service.join_project(self.project, self.user)
run_after_commit_or_now { notification_service.new_project_member(self) } unless @skip_notification run_after_commit_or_now { notification_service.new_project_member(self) }
end end
super super
...@@ -117,7 +117,7 @@ class ProjectMember < Member ...@@ -117,7 +117,7 @@ class ProjectMember < Member
def post_update_hook def post_update_hook
if access_level_changed? if access_level_changed?
run_after_commit { notification_service.update_project_member(self) } unless @skip_notification run_after_commit { notification_service.update_project_member(self) }
end end
super super
...@@ -134,13 +134,13 @@ class ProjectMember < Member ...@@ -134,13 +134,13 @@ class ProjectMember < Member
end end
def after_accept_invite def after_accept_invite
notification_service.accept_project_invite(self) unless @skip_notification notification_service.accept_project_invite(self)
super super
end end
def after_decline_invite def after_decline_invite
notification_service.decline_project_invite(self) unless @skip_notification notification_service.decline_project_invite(self)
super super
end end
......
...@@ -5,8 +5,6 @@ module EE ...@@ -5,8 +5,6 @@ module EE
extend ActiveSupport::Concern extend ActiveSupport::Concern
extend ::Gitlab::Utils::Override extend ::Gitlab::Utils::Override
attr_accessor :skip_notification
class_methods do class_methods do
extend ::Gitlab::Utils::Override extend ::Gitlab::Utils::Override
...@@ -15,7 +13,6 @@ module EE ...@@ -15,7 +13,6 @@ module EE
super super
member.attributes = { member.attributes = {
skip_notification: ldap,
ldap: ldap ldap: ldap
} }
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment