diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-14 20:32:51 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-14 20:32:51 +0400 |
commit | c69b8e04591907d030b2cd544a606fd0e576116a (patch) | |
tree | 317db4259219bc7f3a3ff6e3c38c802a8d086d2c /lib/tasks/gitlab/bulk_add_permission.rake | |
parent | eb4a9bfbca5427e6b9a8fcf2ed0b1f9f96ae099d (diff) |
Huge replace of old users_project and users_group references
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/tasks/gitlab/bulk_add_permission.rake')
-rw-r--r-- | lib/tasks/gitlab/bulk_add_permission.rake | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/tasks/gitlab/bulk_add_permission.rake b/lib/tasks/gitlab/bulk_add_permission.rake index 0e1a3d071e9..3d8c171dfa3 100644 --- a/lib/tasks/gitlab/bulk_add_permission.rake +++ b/lib/tasks/gitlab/bulk_add_permission.rake @@ -7,10 +7,10 @@ namespace :gitlab do projects_ids = Project.pluck(:id) puts "Importing #{user_ids.size} users into #{projects_ids.size} projects" - UsersProject.add_users_into_projects(projects_ids, user_ids, UsersProject::DEVELOPER) + ProjectMember.add_users_into_projects(projects_ids, user_ids, ProjectMember::DEVELOPER) puts "Importing #{admin_ids.size} admins into #{projects_ids.size} projects" - UsersProject.add_users_into_projects(projects_ids, admin_ids, UsersProject::MASTER) + ProjectMember.add_users_into_projects(projects_ids, admin_ids, ProjectMember::MASTER) end desc "GITLAB | Add a specific user to all projects (as a developer)" @@ -18,7 +18,7 @@ namespace :gitlab do user = User.find_by(email: args.email) project_ids = Project.pluck(:id) puts "Importing #{user.email} users into #{project_ids.size} projects" - UsersProject.add_users_into_projects(project_ids, Array.wrap(user.id), UsersProject::DEVELOPER) + ProjectMember.add_users_into_projects(project_ids, Array.wrap(user.id), ProjectMember::DEVELOPER) end desc "GITLAB | Add all users to all groups (admin users are added as owners)" @@ -30,8 +30,8 @@ namespace :gitlab do puts "Importing #{user_ids.size} users into #{groups.size} groups" puts "Importing #{admin_ids.size} admins into #{groups.size} groups" groups.each do |group| - group.add_users(user_ids, UsersGroup::DEVELOPER) - group.add_users(admin_ids, UsersGroup::OWNER) + group.add_users(user_ids, GroupMember::DEVELOPER) + group.add_users(admin_ids, GroupMember::OWNER) end end @@ -41,7 +41,7 @@ namespace :gitlab do groups = Group.all puts "Importing #{user.email} users into #{groups.size} groups" groups.each do |group| - group.add_users(Array.wrap(user.id), UsersGroup::DEVELOPER) + group.add_users(Array.wrap(user.id), GroupMember::DEVELOPER) end end end |