提交 9fd35740 编写于 作者: J James Lopez

refactored notes logic

上级 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'])
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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册