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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
d5054abf
Commit
d5054abf
authored
Aug 04, 2017
by
http://jneen.net/
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Member#notifiable?(type, opts)
parent
7e7f602d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
0 deletions
+12
-0
app/models/member.rb
app/models/member.rb
+4
-0
app/models/members/group_member.rb
app/models/members/group_member.rb
+4
-0
app/models/members/project_member.rb
app/models/members/project_member.rb
+4
-0
No files found.
app/models/member.rb
View file @
d5054abf
...
...
@@ -332,4 +332,8 @@ class Member < ActiveRecord::Base
def
notification_service
NotificationService
.
new
end
def
notifiable?
(
type
,
opts
=
{})
raise
'abstract'
end
end
app/models/members/group_member.rb
View file @
d5054abf
...
...
@@ -30,6 +30,10 @@ class GroupMember < Member
'Group'
end
def
notifiable?
(
type
,
opts
=
{})
NotificationRecipientService
.
notifiable?
(
user
,
type
,
{
group:
group
}.
merge
(
opts
))
end
private
def
send_invite
...
...
app/models/members/project_member.rb
View file @
d5054abf
...
...
@@ -87,6 +87,10 @@ class ProjectMember < Member
project
.
owner
==
user
end
def
notifiable?
(
type
,
opts
=
{})
NotificationRecipientService
.
notifiable?
(
user
,
type
,
{
project:
project
}.
merge
(
opts
))
end
private
def
delete_member_todos
...
...
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