Admin area improved

This commit is contained in:
Dmitriy Zaporozhets 2012-02-11 19:56:18 +02:00
parent a769204ff4
commit cc043f32d8
39 changed files with 434 additions and 334 deletions

View file

@ -27,6 +27,20 @@ class UsersProject < ActiveRecord::Base
end
end
def self.user_bulk_import(user, project_ids, project_access, repo_access)
UsersProject.transaction do
project_ids.each do |project_id|
users_project = UsersProject.new(
:repo_access => repo_access,
:project_access => project_access,
)
users_project.project_id = project_id
users_project.user_id = user.id
users_project.save
end
end
end
def update_repository
Gitlabhq::GitHost.system.new.configure do |c|
c.update_project(project.path, project)