refactored notes logic

This commit is contained in:
James Lopez 2016-06-13 17:09:21 +02:00
parent 833dc3204d
commit 9fd35740b8

View file

@ -57,9 +57,11 @@ module Gitlab
author = @relation_hash.delete('author')
if admin_user? && @members_mapper.missing_author_ids.include?(old_author_id)
update_note_for_missing_author(author['name'])
end
update_note_for_missing_author(author['name']) if can_update_notes?
end
def can_update_notes?
(admin_user? && @members_mapper.missing_author_ids.include?(old_author_id)) || !admin_user?
end
def missing_author_note(updated_at, author_name)