| ... | @@ -10,7 +10,7 @@ module API |
... | @@ -10,7 +10,7 @@ module API |
|
|
end
|
|
end
|
|
|
|
|
|
|
|
def update_note(noteable, note_id)
|
|
def update_note(noteable, note_id)
|
|
|
note = noteable.notes.find(params[:note_id])
|
|
note = noteable.notes.find(note_id)
|
|
|
|
|
|
|
|
authorize! :admin_note, note
|
|
authorize! :admin_note, note
|
|
|
|
|
|
| ... | @@ -59,8 +59,8 @@ module API |
... | @@ -59,8 +59,8 @@ module API |
|
|
end
|
|
end
|
|
|
|
|
|
|
|
def get_note(noteable, note_id)
|
|
def get_note(noteable, note_id)
|
|
|
note = noteable.notes.with_metadata.find(params[:note_id])
|
|
note = noteable.notes.with_metadata.find(note_id)
|
|
|
can_read_note = !note.cross_reference_not_visible_for?(current_user)
|
|
can_read_note = note.visible_for?(current_user)
|
|
|
|
|
|
|
|
if can_read_note
|
|
if can_read_note
|
|
|
present note, with: Entities::Note
|
|
present note, with: Entities::Note
|
| ... | |
... | |
| ... | | ... | |