Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3d078a9d
Commit
3d078a9d
authored
Mar 11, 2018
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent sending an access request to a project from failing when the project has invited members
parent
fd85f14c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/models/member.rb
app/models/member.rb
+1
-1
app/services/notification_service.rb
app/services/notification_service.rb
+2
-2
No files found.
app/models/member.rb
View file @
3d078a9d
...
...
@@ -55,7 +55,7 @@ class Member < ActiveRecord::Base
scope
:active_without_invites
,
->
do
left_join_users
.
where
(
users:
{
state:
'active'
})
.
where
(
requested_at:
nil
)
.
non_request
.
reorder
(
nil
)
end
...
...
app/services/notification_service.rb
View file @
3d078a9d
...
...
@@ -208,9 +208,9 @@ class NotificationService
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
=
member
.
source
.
group
.
members
.
owners_and_masters
recipients
=
member
.
source
.
group
.
members
.
active_without_invites
.
owners_and_masters
end
recipients
.
each
{
|
recipient
|
deliver_access_request_email
(
recipient
,
member
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment