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
4b50f850
Commit
4b50f850
authored
Jul 03, 2018
by
Jarka Kadlecová
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use for_issuable? instead of for_issuable_with_ability?
parent
ff89a77c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
app/models/note.rb
app/models/note.rb
+1
-1
app/services/todo_service.rb
app/services/todo_service.rb
+1
-1
ee/app/models/ee/note.rb
ee/app/models/ee/note.rb
+2
-2
No files found.
app/models/note.rb
View file @
4b50f850
...
...
@@ -237,7 +237,7 @@ class Note < ActiveRecord::Base
!
for_personal_snippet?
end
def
for_issuable
_with_ability
?
def
for_issuable?
for_issue?
||
for_merge_request?
end
...
...
app/services/todo_service.rb
View file @
4b50f850
...
...
@@ -341,7 +341,7 @@ class TodoService
end
def
reject_users_without_access
(
users
,
parent
,
target
)
if
target
.
is_a?
(
Note
)
&&
target
.
for_issuable
_with_ability
?
if
target
.
is_a?
(
Note
)
&&
target
.
for_issuable?
target
=
target
.
noteable
end
...
...
ee/app/models/ee/note.rb
View file @
4b50f850
...
...
@@ -57,8 +57,8 @@ module EE
super
.
merge
(
banzai_context_params
)
end
override
:for_issuable
_with_ability
?
def
for_issuable
_with_ability
?
override
:for_issuable?
def
for_issuable?
for_epic?
||
super
end
...
...
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