Fixed close merge request not hiding
This commit is contained in:
parent
d6b7599df4
commit
b53ccd112d
|
@ -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
|
||||||
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)
|
||||||
|
|
Loading…
Reference in New Issue