Allows multiple roles on the same project (#706). Prerequisite for user groups feature.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2726 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-05-10 10:54:31 +00:00
parent 814e138c2a
commit 7dccf9fda6
65 changed files with 340 additions and 175 deletions
+4 -4
View File
@@ -40,7 +40,7 @@ class RolesController < ApplicationController
@role.workflows.copy(copy_from)
end
flash[:notice] = l(:notice_successful_create)
redirect_to :action => 'list'
redirect_to :action => 'index'
end
@permissions = @role.setable_permissions
@roles = Role.find :all, :order => 'builtin, position'
@@ -50,7 +50,7 @@ class RolesController < ApplicationController
@role = Role.find(params[:id])
if request.post? and @role.update_attributes(params[:role])
flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'list'
redirect_to :action => 'index'
end
@permissions = @role.setable_permissions
end
@@ -58,7 +58,7 @@ class RolesController < ApplicationController
def destroy
@role = Role.find(params[:id])
@role.destroy
redirect_to :action => 'list'
redirect_to :action => 'index'
rescue
flash[:error] = 'This role is in use and can not be deleted.'
redirect_to :action => 'index'
@@ -73,7 +73,7 @@ class RolesController < ApplicationController
role.save
end
flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'list'
redirect_to :action => 'index'
end
end
end