Added a rake task to display permissions.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3948 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis 2010-08-18 17:23:23 +00:00
parent e6e21046c0
commit c090d115e2
1 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,9 @@
namespace :redmine do
desc "List all permissions and the actions registered with them"
task :permissions => :environment do
puts "Permission Name - controller/action pairs"
Redmine::AccessControl.permissions.sort {|a,b| a.name.to_s <=> b.name.to_s }.each do |permission|
puts ":#{permission.name} - #{permission.actions.join(', ')}"
end
end
end