diff options
author | James Lopez <james@jameslopez.es> | 2017-01-31 16:32:26 +0100 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-01-31 16:32:26 +0100 |
commit | 918eaba0c3898b5b81d2db1cd598fd3fecac9ef8 (patch) | |
tree | bbbedab7785db83140d2c1ab2e42ce104ebc4144 /lib | |
parent | a1a5dd4b5c9abac53bb0af6f2bd74dc1159cef8d (diff) | |
download | gitlab-ce-918eaba0c3898b5b81d2db1cd598fd3fecac9ef8.tar.gz |
remove old project members from project
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/import_export/members_mapper.rb | 4 |
1 files changed, 4 insertions, 0 deletions
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 |