Commit 9fd35740 authored by James Lopez's avatar James Lopez

refactored notes logic

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