diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-12-14 22:24:20 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-12-14 22:24:20 +0000 |
commit | 7c00a4a11fc33bb5016cb6b1e401a9ecf56dc3f5 (patch) | |
tree | 72f6cc21b4a0778703a4cb4f496a05f012ee6963 /app/controllers | |
parent | 7d2298f39c609ec79dd16f27ef69885a7c390d00 (diff) | |
download | redmine-7c00a4a11fc33bb5016cb6b1e401a9ecf56dc3f5.tar.gz redmine-7c00a4a11fc33bb5016cb6b1e401a9ecf56dc3f5.zip |
Restores migration broken by r8182 and removes default scope on Role (#9800).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8213 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/roles_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/roles_controller.rb b/app/controllers/roles_controller.rb index b74404470..cfdc133bf 100644 --- a/app/controllers/roles_controller.rb +++ b/app/controllers/roles_controller.rb @@ -30,7 +30,7 @@ class RolesController < ApplicationController def new # Prefills the form with 'Non member' role permissions @role = Role.new(params[:role] || {:permissions => Role.non_member.permissions}) - @roles = Role.all + @roles = Role.sorted.all end def create @@ -43,7 +43,7 @@ class RolesController < ApplicationController flash[:notice] = l(:notice_successful_create) redirect_to :action => 'index' else - @roles = Role.all + @roles = Role.sorted.all render :action => 'new' end end @@ -70,7 +70,7 @@ class RolesController < ApplicationController end def permissions - @roles = Role.find(:all, :order => 'builtin, position') + @roles = Role.sorted.all @permissions = Redmine::AccessControl.permissions.select { |p| !p.public? } if request.post? @roles.each do |role| |