projects
/
rails.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'upstream/pull/5064'
[rails.git]
/
app
/
controllers
/
api
/
notes_controller.rb
diff --git
a/app/controllers/api/notes_controller.rb
b/app/controllers/api/notes_controller.rb
index 7e2e7fb793babed86952313cc1d0703043d2f760..eca0728b65700d90d7ea2f38126c9e06fe961d7c 100644
(file)
--- a/
app/controllers/api/notes_controller.rb
+++ b/
app/controllers/api/notes_controller.rb
@@
-384,11
+384,7
@@
module Api
def add_comment(note, text, event, notify: true)
attributes = { :visible => true, :event => event, :body => text }
def add_comment(note, text, event, notify: true)
attributes = { :visible => true, :event => event, :body => text }
- if doorkeeper_token
- author = current_user if scope_enabled?(:write_notes)
- else
- author = current_user
- end
+ author = current_user if scope_enabled?(:write_notes)
if author
attributes[:author_id] = author.id
if author
attributes[:author_id] = author.id