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
Boxiang Sun
gitlab-ce
Commits
c9d561b1
Commit
c9d561b1
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
da841106
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/models/note.rb
app/models/note.rb
+1
-1
app/services/todo_service.rb
app/services/todo_service.rb
+1
-1
No files found.
app/models/note.rb
View file @
c9d561b1
...
@@ -229,7 +229,7 @@ class Note < ActiveRecord::Base
...
@@ -229,7 +229,7 @@ class Note < ActiveRecord::Base
!
for_personal_snippet?
!
for_personal_snippet?
end
end
def
for_issuable
_with_ability
?
def
for_issuable?
for_issue?
||
for_merge_request?
for_issue?
||
for_merge_request?
end
end
...
...
app/services/todo_service.rb
View file @
c9d561b1
...
@@ -321,7 +321,7 @@ class TodoService
...
@@ -321,7 +321,7 @@ class TodoService
end
end
def
reject_users_without_access
(
users
,
parent
,
target
)
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
target
=
target
.
noteable
end
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