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
private
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
end
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
end
def post_update_hook
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
super
end
def after_accept_invite
notification_service.accept_group_invite(self) unless @skip_notification
notification_service.accept_group_invite(self)
super
end
def after_decline_invite
notification_service.decline_group_invite(self) unless @skip_notification
notification_service.decline_group_invite(self)
super
end
......
......@@ -101,7 +101,7 @@ class ProjectMember < Member
end
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
end
......@@ -109,7 +109,7 @@ class ProjectMember < Member
def post_create_hook
unless owner?
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
super
......@@ -117,7 +117,7 @@ class ProjectMember < Member
def post_update_hook
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
super
......@@ -134,13 +134,13 @@ class ProjectMember < Member
end
def after_accept_invite
notification_service.accept_project_invite(self) unless @skip_notification
notification_service.accept_project_invite(self)
super
end
def after_decline_invite
notification_service.decline_project_invite(self) unless @skip_notification
notification_service.decline_project_invite(self)
super
end
......
......@@ -5,8 +5,6 @@ module EE
extend ActiveSupport::Concern
extend ::Gitlab::Utils::Override
attr_accessor :skip_notification
class_methods do
extend ::Gitlab::Utils::Override
......@@ -15,7 +13,6 @@ module EE
super
member.attributes = {
skip_notification: ldap,
ldap: ldap
}
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