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
Jérome Perrin
gitlab-ce
Commits
246951bb
Commit
246951bb
authored
Aug 01, 2017
by
http://jneen.net/
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unmemoize read_ability
since it's only called once now in make_recipient
parent
934305ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
app/services/notification_recipient_service.rb
app/services/notification_recipient_service.rb
+9
-8
No files found.
app/services/notification_recipient_service.rb
View file @
246951bb
...
...
@@ -87,13 +87,12 @@ module NotificationRecipientService
end
def
read_ability
@read_ability
||=
case
target
when
Issuable
:"read_
#{
target
.
to_ability_name
}
"
when
Ci
::
Pipeline
:read_build
# We have build trace in pipeline emails
end
case
target
when
Issuable
:"read_
#{
target
.
to_ability_name
}
"
when
Ci
::
Pipeline
:read_build
# We have build trace in pipeline emails
end
end
def
custom_action
...
...
@@ -308,7 +307,9 @@ module NotificationRecipientService
end
def
read_ability
@read_ability
||=
:"read_
#{
target
.
class
.
model_name
.
name
.
underscore
}
"
return
nil
if
target
.
nil?
:"read_
#{
target
.
class
.
model_name
.
name
.
underscore
}
"
end
def
build!
...
...
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