diff --git a/lib/tasks/bulk_add_permission.rake b/lib/tasks/bulk_add_permission.rake index 779f286f2fd0c46a8b75fc10d3fe772ea587ec0c..55797825e0cf816e71b7899fa878617eea54d6a8 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