diff --git a/lib/tasks/bulk_add_permission.rake b/lib/tasks/bulk_add_permission.rake index 779f286f2fd..55797825e0c 100644 --- a/lib/tasks/bulk_add_permission.rake +++ b/lib/tasks/bulk_add_permission.rake @@ -14,3 +14,13 @@ task :add_users_to_project_teams => :environment do |t, args| UsersProject.bulk_import(project, admins, UsersProject::MASTER) end end + +desc "Add user to as a developer to all projects" +task :add_user_to_project_teams, [:email] => :environment do |t, args| + user_email = args.email + user = User.find_by_email(user_email) + + project_ids = Project.all.map(&:id) + + UsersProject.user_bulk_import(user,project_ids,UsersProject::DEVELOPER) +end