Authorization Usage

Filter rules in actions by controller:

<%= navigation %>

<% javascript_tag do %> function show_graph (privilege, context) { base_url = "<%= graph_authorization_rules_path('svg') %>"; $('graph').data = base_url + '?privilege_hierarchy=1&highlight_privilege=' + privilege + '&filter_contexts=' + context; $('graph').up().show(); } <% end %> <% @auth_usages_by_controller.keys.sort {|c1, c2| c1.name <=> c2.name}.each do |controller| %> <% default_context = controller.controller_name.to_sym rescue nil %> <% @auth_usages_by_controller[controller].keys.sort {|c1, c2| c1.to_s <=> c2.to_s}.each do |action| %> <% auth_info = @auth_usages_by_controller[controller][action] %> <% first_permission = auth_info[:controller_permissions] && auth_info[:controller_permissions][0] %> <% if first_permission %> <% else %> <% end %> <% end %> <% end %>
<%= h controller.controller_name %>
<%= h action %><%= h auth_info[:privilege] || action %> <%= h auth_info[:context] || default_context %>