Authorize access to admin panel, etc.

Adds a separate admin namespace and base controller, with authorization
by looking up the admin property in the user's LDAP account.
This commit is contained in:
2020-11-18 00:22:44 +01:00
parent 6614f14d8a
commit f0312cb8e7
13 changed files with 58 additions and 11 deletions

View File

@@ -0,0 +1,4 @@
<h2>Admin Panel</h2>
<p>
Ohai there, admin human.
</p>

View File

@@ -1,8 +1,8 @@
<h2>LDAP users</h2>
<ul>
<li><%= link_to 'kosmos.org', ldap_users_path %></li>
<li><%= link_to '5apps.com', ldap_users_path(ou: '5apps.com') %></li>
<li><%= link_to 'kosmos.org', admin_ldap_users_path %></li>
<li><%= link_to '5apps.com', admin_ldap_users_path(ou: '5apps.com') %></li>
</ul>
<table>

View File

@@ -0,0 +1,2 @@
<h2>Access forbidden</h2>
<p>Not with those shoes, buddy.</p>