diff options
author | Mark Chao <mchao@gitlab.com> | 2018-07-11 14:36:08 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-07-11 14:36:08 +0000 |
commit | a63bce1a4b55bc6cbafb9dec12d33028521489e9 (patch) | |
tree | ee9466e6b06536a65d4e851f4096679c6f968d1e /app/services/notification_service.rb | |
parent | 1bf54e092783f7ad388225d32ab79ac1e845559c (diff) | |
download | gitlab-ce-a63bce1a4b55bc6cbafb9dec12d33028521489e9.tar.gz |
Resolve "Rename the `Master` role to `Maintainer`" Backend
Diffstat (limited to 'app/services/notification_service.rb')
-rw-r--r-- | app/services/notification_service.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb index 8c6221af788..d7be9a925b5 100644 --- a/app/services/notification_service.rb +++ b/app/services/notification_service.rb @@ -274,9 +274,9 @@ class NotificationService def new_access_request(member) return true unless member.notifiable?(:subscription) - recipients = member.source.members.active_without_invites_and_requests.owners_and_masters - if fallback_to_group_owners_masters?(recipients, member) - recipients = member.source.group.members.active_without_invites_and_requests.owners_and_masters + recipients = member.source.members.active_without_invites_and_requests.owners_and_maintainers + if fallback_to_group_owners_maintainers?(recipients, member) + recipients = member.source.group.members.active_without_invites_and_requests.owners_and_maintainers end recipients.each { |recipient| deliver_access_request_email(recipient, member) } @@ -519,7 +519,7 @@ class NotificationService return [] unless project - notifiable_users(project.team.masters, :watch, target: project) + notifiable_users(project.team.maintainers, :watch, target: project) end def notifiable?(*args) @@ -534,7 +534,7 @@ class NotificationService mailer.member_access_requested_email(member.real_source_type, member.id, recipient.user.notification_email).deliver_later end - def fallback_to_group_owners_masters?(recipients, member) + def fallback_to_group_owners_maintainers?(recipients, member) return false if recipients.present? member.source.respond_to?(:group) && member.source.group |