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/models/project.rb | |
parent | 8a7e48133fa53ea53107eafb4e71fbe72545588e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index bb266d86cdb..2cbbb869d7b 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -2742,7 +2742,13 @@ class Project < ApplicationRecord def access_request_approvers_to_be_notified access_request_approvers = members.owners_and_maintainers - access_request_approvers.connected_to_user.order_recent_sign_in.limit(Member::ACCESS_REQUEST_APPROVERS_TO_BE_NOTIFIED_LIMIT) + recipients = access_request_approvers.connected_to_user.order_recent_sign_in.limit(Member::ACCESS_REQUEST_APPROVERS_TO_BE_NOTIFIED_LIMIT) + + if recipients.blank? + recipients = group.access_request_approvers_to_be_notified + end + + recipients end def pages_lookup_path(trim_prefix: nil, domain: nil) |