diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-12-02 12:58:07 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-12-02 12:58:07 +0000 |
commit | aebcfb1eda843b90851e0facdc0a386bf06c5d29 (patch) | |
tree | a428304ae5605fe162464e582280bc017c055a46 /app/controllers/roles_controller.rb | |
parent | 457c9a8e727dff3167065954ef7269f2a6edb296 (diff) | |
download | redmine-aebcfb1eda843b90851e0facdc0a386bf06c5d29.tar.gz redmine-aebcfb1eda843b90851e0facdc0a386bf06c5d29.zip |
When creating a new role, permissions are pre-filled with 'Non member' role permissions.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@943 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/roles_controller.rb')
-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' |