Commit b53ccd11 authored by Phil Hughes's avatar Phil Hughes

Fixed close merge request not hiding

parent d6b7599d
...@@ -600,6 +600,7 @@ ...@@ -600,6 +600,7 @@
form.find("#note_noteable_type").val(dataHolder.data("noteableType")); form.find("#note_noteable_type").val(dataHolder.data("noteableType"));
form.find("#note_noteable_id").val(dataHolder.data("noteableId")); form.find("#note_noteable_id").val(dataHolder.data("noteableId"));
form.find('.js-note-discard').show().removeClass('js-note-discard').addClass('js-close-discussion-note-form').text(form.find('.js-close-discussion-note-form').data('cancel-text')); form.find('.js-note-discard').show().removeClass('js-note-discard').addClass('js-close-discussion-note-form').text(form.find('.js-close-discussion-note-form').data('cancel-text'));
form.find('.js-note-target-close').remove();
if (canResolve === 'false') { if (canResolve === 'false') {
form.find('resolve-comment-btn').remove(); form.find('resolve-comment-btn').remove();
......
...@@ -76,7 +76,7 @@ class Discussion ...@@ -76,7 +76,7 @@ class Discussion
return false unless resolvable? return false unless resolvable?
current_user == self.noteable.author || current_user == self.noteable.author ||
can?(current_user, :push_code, self.project) current_user.can?(:push_code, self.project)
end end
def resolve!(current_user) def resolve!(current_user)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment