Hard-failing a mirror fails for personal projects with blocked owners
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4975 fixes one bug, but adds another: it will break if project.group
is nil
.
We usually wouldn’t get there because recipients
would contain the project namespace owner if the project doesn’t have a group, but because we now use active_without_invitees
, we skip blocked members. So if a personal project with a blocked owner is hard-failed, we go into the unless recipients.present?
branch and fail on project.group.members
with a NoMethodError
on nil
.
We need to continue to filter out invitees and access-requests, but allow blocked users (even though they won’t be able to follow the “settings” link), and we need to verify that there is a project.group
before using it.
We should also stop using active_without_invites
for NotificationService#new_access_request
, which was also touched in that MR.