diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-14 15:08:53 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-14 15:08:53 +0300 |
commit | 7a124e225ea58c2a432dd29f82ba682963886383 (patch) | |
tree | 4ad5eefec173bdc56aaacc81e4dfb66a8fb9e254 /app/models/project.rb | |
parent | 067b3d04573d1473dbc6c81ef775d70c6636ff3f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index aeed681fc6f..4c99809f819 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -2585,16 +2585,7 @@ class Project < ApplicationRecord end def access_request_approvers_to_be_notified - # For a personal project: - # The creator is added as a member with `Owner` access level, starting from GitLab 14.8 - # The creator was added as a member with `Maintainer` access level, before GitLab 14.8 - # So, to make sure access requests for all personal projects work as expected, - # we need to filter members with the scope `owners_and_maintainers`. - access_request_approvers = if personal? - members.owners_and_maintainers - else - members.maintainers - end + 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) end |