summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2019-01-24 16:33:26 +0000
committerYorick Peterse <yorickpeterse@gmail.com>2019-01-24 16:33:26 +0000
commit610247e979438a42ccbd2bf9a6a38378f4ee4c8e (patch)
treeb22303c3dcd9ef24685be389cc7f0008285786b4 /app/services
parentbf9fa53859d115fd32a4869b4592c932d709bc90 (diff)
parent022f60e80144058bcb4b42b0b3b9e4da130983d0 (diff)
downloadgitlab-ce-610247e979438a42ccbd2bf9a6a38378f4ee4c8e.tar.gz
Merge branch 'security-project-move-users' into 'master'
[master] Send notification only to authorized users when moving a project Closes #2777 See merge request gitlab/gitlabhq!2791
Diffstat (limited to 'app/services')
-rw-r--r--app/services/notification_service.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index e1cf327209b..1a65561dd70 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -373,7 +373,8 @@ class NotificationService
end
def project_was_moved(project, old_path_with_namespace)
- recipients = notifiable_users(project.team.members, :mention, project: project)
+ recipients = project.private? ? project.team.members_in_project_and_ancestors : project.team.members
+ recipients = notifiable_users(recipients, :mention, project: project)
recipients.each do |recipient|
mailer.project_was_moved_email(