diff options
Diffstat (limited to 'app/controllers/roles_controller.rb')
-rw-r--r-- | app/controllers/roles_controller.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/roles_controller.rb b/app/controllers/roles_controller.rb index 4796bb7f0..9fdd9701b 100644 --- a/app/controllers/roles_controller.rb +++ b/app/controllers/roles_controller.rb @@ -36,10 +36,15 @@ class RolesController < ApplicationController # Prefills the form with 'Non member' role permissions @role = Role.new(params[:role] || {:permissions => Role.non_member.permissions}) if request.post? && @role.save + # workflow copy + if !params[:copy_workflow_from].blank? && (copy_from = Role.find_by_id(params[:copy_workflow_from])) + @role.workflows.copy(copy_from) + end flash[:notice] = l(:notice_successful_create) redirect_to :action => 'list' end @permissions = @role.setable_permissions + @roles = Role.find :all, :order => 'builtin, position' end def edit |