summaryrefslogtreecommitdiff
path: root/app/services/notification_service.rb
diff options
context:
space:
mode:
authorMark Chao <mchao@gitlab.com>2018-07-11 14:36:08 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-07-11 14:36:08 +0000
commita63bce1a4b55bc6cbafb9dec12d33028521489e9 (patch)
treeee9466e6b06536a65d4e851f4096679c6f968d1e /app/services/notification_service.rb
parent1bf54e092783f7ad388225d32ab79ac1e845559c (diff)
downloadgitlab-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.rb10
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