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

refactored notes logic

parent 833dc320
......@@ -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'])
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)
......
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