Commit 68e8766f authored by Robert Speicher's avatar Robert Speicher
Browse files

Merge branch 'dm-mirror-hard-failed-invites' into 'master'

Prevent sending an access request from failing when the project has invited masters/owners

See merge request gitlab-org/gitlab-ce!17760
......@@ -55,7 +55,7 @@ class Member < ActiveRecord::Base
scope :active_without_invites, -> do
.where(users: { state: 'active' })
.where(requested_at: nil)
......@@ -208,9 +208,9 @@ def new_note(note)
def new_access_request(member)
return true unless member.notifiable?(:subscription)
recipients = member.source.members.owners_and_masters
recipients = member.source.members.active_without_invites.owners_and_masters
if fallback_to_group_owners_masters?(recipients, member)
recipients =
recipients =
recipients.each { |recipient| deliver_access_request_email(recipient, member) }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment