diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-11-10 18:59:06 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-11-10 18:59:06 +0000 |
commit | 79c33bbc838fd837e516fd60569dbcf7917bd534 (patch) | |
tree | 20695e6f03f08925d6be3c96846668d979b4b3b3 /app/controllers | |
parent | f6b2be81b9cb09485a08e58fc73d9290fd544148 (diff) | |
download | redmine-79c33bbc838fd837e516fd60569dbcf7917bd534.tar.gz redmine-79c33bbc838fd837e516fd60569dbcf7917bd534.zip |
Maps repository users to Redmine users (#1383).
Users with same username or email are automatically mapped. Mapping can be manually adjusted in repository settings. Multiple usernames can be mapped to the same Redmine user.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2006 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/repositories_controller.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 78576856d..17f836b7b 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -44,6 +44,20 @@ class RepositoriesController < ApplicationController render(:update) {|page| page.replace_html "tab-content-repository", :partial => 'projects/settings/repository'} end + def committers + @committers = @repository.committers + @users = @project.users + additional_user_ids = @committers.collect(&:last).collect(&:to_i) - @users.collect(&:id) + @users += User.find_all_by_id(additional_user_ids) unless additional_user_ids.empty? + @users.compact! + @users.sort! + if request.post? + @repository.committer_ids = params[:committers] + flash[:notice] = l(:notice_successful_update) + redirect_to :action => 'committers', :id => @project + end + end + def destroy @repository.destroy redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'repository' |