Commit f45345ed authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix project destroy timeout from admin area. Added 30 ssh keys to dev seeds

parent a16533a0
......@@ -35,6 +35,9 @@ class Admin::ProjectsController < AdminController
end
def destroy
# Delete team first in order to prevent multiple gitolite calls
@project.truncate_team
@project.destroy
redirect_to admin_projects_path, notice: 'Project was successfully deleted.'
......
Key.seed(:id, [
{
id: 1,
title: "Sample key",
key: "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
user_id: 1,
}
])
Gitlab::Seeder.quiet do
User.first(30).each_with_index do |user, i|
Key.seed(:id, [
{
id: i,
title: "Sample key #{i}",
key: "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt#{i + 100}6k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
user_id: user.id,
}
])
puts "SSH KEY ##{i} added.".green
end
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