diff options
-rw-r--r-- | app/controllers/roles_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/roles_controller.rb b/app/controllers/roles_controller.rb index a8f21ff65..3b5766aaf 100644 --- a/app/controllers/roles_controller.rb +++ b/app/controllers/roles_controller.rb @@ -33,7 +33,8 @@ class RolesController < ApplicationController end def new - @role = Role.new(params[:role]) + # Prefills the form with 'Non member' role permissions + @role = Role.new(params[:role] || {:permissions => Role.non_member.permissions}) if request.post? && @role.save flash[:notice] = l(:notice_successful_create) redirect_to :action => 'list' |