summaryrefslogtreecommitdiff
path: root/lib/gitlab/import_export/relation_factory.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/import_export/relation_factory.rb')
-rw-r--r--lib/gitlab/import_export/relation_factory.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/gitlab/import_export/relation_factory.rb b/lib/gitlab/import_export/relation_factory.rb
index df05d6a6f67..5f12caa8981 100644
--- a/lib/gitlab/import_export/relation_factory.rb
+++ b/lib/gitlab/import_export/relation_factory.rb
@@ -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)