]> source.dussan.org Git - redmine.git/commitdiff
When creating a new role, permissions are pre-filled with 'Non member' role permissions.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 2 Dec 2007 12:58:07 +0000 (12:58 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 2 Dec 2007 12:58:07 +0000 (12:58 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@943 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/roles_controller.rb

index a8f21ff65228cebc1c59b99e91d81ab77fe51683..3b5766aafc7603e9551c08d95d8f8b36224f7268 100644 (file)
@@ -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'