File: permissions.rake

package info (click to toggle)
redmine 1.4.4%2Bdfsg1-2%2Bdeb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 13,124 kB
  • sloc: ruby: 72,074; sh: 536; php: 263; perl: 255; python: 150; makefile: 46; sql: 37
file content (9 lines) | stat: -rw-r--r-- 369 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
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