Currently active rules in this application.
<%= navigation %>
<% javascript_tag do %> if (typeof Prototype != 'object') { //load up prototype... it's needed here var s = document.createElement('script'); s.setAttribute('src','http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js'); document.getElementsByTagName('body')[0].appendChild(s); } function update_graph (form) { base_url = "<%= url_for :format => 'svg' %>"; $('graph').data = base_url + '?' + form.serialize(); } function set_filter (filter) { for (f in filter) { var select = $("filter_" + f); if (select) { var opt = select.down("option[value='"+ filter[f] + "']"); if (opt) { opt.selected = true; update_graph(select.form); } } } } <% end %><% form_tag do %> <%#= link_to_graph "Rules" %> <%#= link_to_graph "Privilege hierarchy", :type => 'priv_hierarchy' %> <%= select_tag "filter_roles", options_for_select([["All roles",'']] + controller.authorization_engine.roles.map(&:to_s).sort), :onchange => 'update_graph(this.form)' %> <%= select_tag "filter_contexts", options_for_select([["All contexts",'']] + controller.authorization_engine.auth_rules.collect {|ar| ar.contexts.to_a}.flatten.uniq.map(&:to_s).sort), :onchange => 'update_graph(this.form)' %> <%= check_box_tag "effective_role_privs", "1", false, :onclick => 'update_graph(this.form)' %> <%= label_tag "effective_role_privs", "Effective privileges" %> <%= check_box_tag "privilege_hierarchy", "1", false, :onclick => 'update_graph(this.form)' %> <%= label_tag "privilege_hierarchy", "Show full privilege hierarchy" %> <%= check_box_tag "stacked_roles", "1", false, :onclick => 'update_graph(this.form)' %> <%= label_tag "stacked_roles", "Stacked roles" %> <% end %>