Commit 64a7998b authored by o@immerda.ch's avatar o@immerda.ch
Browse files

a tab to show the current acl

parent 39fd1b36
class AclController < AdminController
include ApiBackend
def show
begin
@acl = api.acl_show
rescue ApiBackend::ApiError => e
flash[:notice] = e.api_msg
end
end
end
......@@ -296,6 +296,10 @@ module ApiBackend
"email" => email,
"forwards" => forwards})
end
def acl_show()
get ['acl', 'show']
end
end
def api
......
<pre>
<%= @acl.to_yaml %>
</pre>
......@@ -13,3 +13,7 @@
<li><%= link_to (t :manage_jabber_ids) , jabber_ids_path %></li>
<li><%= link_to (t :manage_jabber_domains) , jabber_domains_path %></li>
</ul>
<h4><%= t(:admin) %></h4>
<ul class="menu">
<li><%= link_to (t :acl) , acl_path %></li>
</ul>
......@@ -85,5 +85,7 @@ Rails.application.routes.draw do
get '/invites', to: 'invites#generate'
post '/invites', to: 'invites#show'
get '/acl', to: 'acl#show'
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment