diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-08 21:08:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-08 21:08:30 +0300 |
commit | 54943f1e68bd4e1951bf3d6c438acab8d783fc31 (patch) | |
tree | 7528e59c2fd305422f64c44c124ed2cda35b6cd2 /app/services/notification_service.rb | |
parent | 8a7e48133fa53ea53107eafb4e71fbe72545588e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/notification_service.rb')
-rw-r--r-- | app/services/notification_service.rb | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb index a2997d3226d..550bd6d4c55 100644 --- a/app/services/notification_service.rb +++ b/app/services/notification_service.rb @@ -495,13 +495,7 @@ class NotificationService def new_access_request(member) return true unless member.notifiable?(:subscription) - source = member.source - - recipients = source.access_request_approvers_to_be_notified - - if fallback_to_group_access_request_approvers?(recipients, source) - recipients = source.group.access_request_approvers_to_be_notified - end + recipients = member.source.access_request_approvers_to_be_notified return true if recipients.empty? @@ -959,12 +953,6 @@ class NotificationService mailer.member_access_requested_email(member.real_source_type, member.id, recipient.user.id).deliver_later end - def fallback_to_group_access_request_approvers?(recipients, source) - return false if recipients.present? - - source.respond_to?(:group) && source.group - end - def warn_skipping_notifications(user, object) Gitlab::AppLogger.warn(message: "Skipping sending notifications", user: user.id, klass: object.class.to_s, object_id: object.id) end |