summaryrefslogtreecommitdiffstats
path: root/lib/tasks/permissions.rake
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-08-18 17:23:23 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-08-18 17:23:23 +0000
commitc090d115e2bda1b72c2711b8df8a79202cbd10db (patch)
tree37b4b42c8e18c2f2bdfe31f00555e1007f67548a /lib/tasks/permissions.rake
parente6e21046c0fb6b5ccb32545e05771916907a62ad (diff)
downloadredmine-c090d115e2bda1b72c2711b8df8a79202cbd10db.tar.gz
redmine-c090d115e2bda1b72c2711b8df8a79202cbd10db.zip
Added a rake task to display permissions.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3948 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/tasks/permissions.rake')
-rw-r--r--lib/tasks/permissions.rake9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/tasks/permissions.rake b/lib/tasks/permissions.rake
new file mode 100644
index 000000000..02ce1b2a8
--- /dev/null
+++ b/lib/tasks/permissions.rake
@@ -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