From 918eaba0c3898b5b81d2db1cd598fd3fecac9ef8 Mon Sep 17 00:00:00 2001
From: James Lopez <james@jameslopez.es>
Date: Tue, 31 Jan 2017 16:32:26 +0100
Subject: [PATCH] remove old project members from project

---
 lib/gitlab/import_export/members_mapper.rb | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/gitlab/import_export/members_mapper.rb b/lib/gitlab/import_export/members_mapper.rb
index 2405b94db50..6189867dc9c 100644
--- a/lib/gitlab/import_export/members_mapper.rb
+++ b/lib/gitlab/import_export/members_mapper.rb
@@ -41,6 +41,10 @@ module Gitlab
       end
 
       def ensure_default_member!
+        @project.project_members.each do |member|
+          member.destroy
+        end
+
         ProjectMember.create!(user: @user, access_level: ProjectMember::MASTER, source_id: @project.id, importing: true)
       end
 
-- 
GitLab