Sha256: 9159e784c782a3405178459a743b75bbcc437b36b8ede385f4bfe47ecedc1fe8

Contents?: true

Size: 1.79 KB

Versions: 29

Compression:

Stored size: 1.79 KB

Contents

<h1>Authorization Usage</h1>
<%= render 'authorization_rules/show_graph' %>
<p>Filter rules in actions by controller:</p>
<p><%= navigation %></p>
<style type="text/css">
  .auth-usages th { text-align: left; padding-top: 1em }
  .auth-usages td { padding-right: 1em }
  .auth-usages tr.action  { cursor: pointer }
  .auth-usages tr.unprotected  { background: #FFA399 }
  .auth-usages tr.no-attribute-check { background: #FFE599 }
  /*.auth-usages tr.catch-all td.privilege,*/
  .auth-usages tr.default-privilege td.privilege,
  .auth-usages tr.default-context td.context { color: #888888 }
  #graph-container {margin: 1em; border:1px solid #ccc; max-width:50%; position:fixed; right:0;}
</style>
<table class="auth-usages">
  <% @auth_usages_by_controller.keys.sort {|c1, c2| c1.name <=> c2.name}.each do |controller| %>
    <% default_context = controller.controller_name.to_sym rescue nil %>
    <tr>
      <th colspan="3"><%= h controller.controller_name %></th>
    </tr>
    <% @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] %>
      <tr class="action <%= auth_usage_info_classes(auth_info) %>" title="<%= auth_usage_info_title(auth_info) %>" onclick="show_graph('<%= auth_info[:privilege] || action %>','<%= auth_info[:context] || default_context %>')">
        <td><%= h action %></td>
        <% if first_permission %>
          <td class="privilege"><%= h auth_info[:privilege] || action %></td>
          <td class="context"><%= h auth_info[:context] || default_context %></td>
        <% else %>
          <td></td><td></td>
        <% end %>
      </tr>
    <% end %>
  <% end %>
</table>

Version data entries

29 entries across 29 versions & 11 rubygems

Version Path
tarsolya-declarative_authorization-0.4.1 app/views/authorization_usages/index.html.erb
timcharper-declarative_authorization-0.4.1.2 app/views/authorization_usages/index.html.erb
declarative_authorization-0.4.1 app/views/authorization_usages/index.html.erb
declarative_authorization-0.4 app/views/authorization_usages/index.html.erb
ghart-declarative_authorization-0.3.2.4 app/views/authorization_usages/index.html.erb
mconnell-declarative_authorization-0.3.2.3 app/views/authorization_usages/index.html.erb
viva-declarative_authorization-0.3.2.3.1 app/views/authorization_usages/index.html.erb
viva-declarative_authorization-0.3.2.2.1 app/views/authorization_usages/index.html.erb
declarative_authorization-0.3.2.3 app/views/authorization_usages/index.html.erb