Commit 2d6a3e6b authored by Seif Attar's avatar Seif Attar

Task to assign user developer role to all projects

parent 22ec4637
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment