summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-09-12 13:48:00 +0000
committerYorick Peterse <yorickpeterse@gmail.com>2016-09-12 13:48:00 +0000
commit12d4eea4c7a46ad3641f2c3a8ee182a16e4848e5 (patch)
treea5efde614fca05123af18c70974eaea64ebdf80a
parent45afdbef0de58f6de207b057e47151611d2ad7e6 (diff)
parentd763aecd07ad8c76619658953c87a292949e55ba (diff)
downloadgitlab-ce-12d4eea4c7a46ad3641f2c3a8ee182a16e4848e5.tar.gz
Merge branch 'sh-defer-resolvable-check' into 'master'
Only check :can_resolve permission if the note is resolvable See merge request !6298
-rw-r--r--CHANGELOG1
-rw-r--r--app/views/projects/notes/_note.html.haml3
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 132122d460d..11e8cba58b6 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date.
v 8.12.0 (unreleased)
- Update the rouge gem to 2.0.6, which adds highlighting support for JSX, Prometheus, and others. !6251
+ - Only check :can_resolve permission if the note is resolvable
- Add ability to fork to a specific namespace using API. (ritave)
- Cleanup misalignments in Issue list view !6206
- Prune events older than 12 months. (ritave)
diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml
index 7c82177f9ea..9ec17cf6e76 100644
--- a/app/views/projects/notes/_note.html.haml
+++ b/app/views/projects/notes/_note.html.haml
@@ -1,6 +1,5 @@
- return unless note.author
- return if note.cross_reference_not_visible_for?(current_user)
-- can_resolve = can?(current_user, :resolve_note, note)
- note_editable = note_editable?(note)
%li.timeline-entry{ id: dom_id(note), class: ["note", "note-row-#{note.id}", ('system-note' if note.system)], data: {author_id: note.author.id, editable: note_editable} }
@@ -24,6 +23,8 @@
%span.note-role.hidden-xs= access
- if note.resolvable?
+ - can_resolve = can?(current_user, :resolve_note, note)
+
%resolve-btn{ ":namespace-path" => "'#{note.project.namespace.path}'",
":project-path" => "'#{note.project.path}'",
":discussion-id" => "'#{note.discussion_id}'",