1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-22 17:34:21 +01:00

adding descriptions for roles

This commit is contained in:
kakwa 2015-06-11 00:33:14 +02:00
parent 98a994e368
commit 9b803008bc
3 changed files with 13 additions and 0 deletions

View File

@ -1,5 +1,6 @@
admin-lv3: admin-lv3:
display_name: Administrators Level 3 display_name: Administrators Level 3
description: Super administrators of the system
backends_groups: backends_groups:
ldap: ldap:
- cn=dns admins,ou=group,dc=example,dc=com - cn=dns admins,ou=group,dc=example,dc=com
@ -13,6 +14,7 @@ admin-lv3:
admin-lv2: admin-lv2:
display_name: Administrators Level 2 display_name: Administrators Level 2
description: Basic administrators of the system
LC_admins: True LC_admins: True
backends_groups: backends_groups:
ldap: ldap:
@ -23,6 +25,7 @@ admin-lv2:
developpers: developpers:
display_name: Developpers display_name: Developpers
description: Developpers of the system
backends_groups: backends_groups:
ldap: ldap:
- cn=developpers,ou=group,dc=example,dc=com - cn=developpers,ou=group,dc=example,dc=com
@ -32,6 +35,7 @@ developpers:
users: users:
display_name: Simple Users display_name: Simple Users
description: Basic users of the system
backends_groups: backends_groups:
ldap: ldap:
- cn=users,ou=group,dc=example,dc=com - cn=users,ou=group,dc=example,dc=com

View File

@ -115,6 +115,9 @@ class Roles:
if not 'display_name' in role: if not 'display_name' in role:
raise MissingKey('display_name', role, self.role_file) raise MissingKey('display_name', role, self.role_file)
if not 'description' in role:
raise MissingKey('description', role, self.role_file)
# Backend is mandatory # Backend is mandatory
if not 'backends_groups' in role: if not 'backends_groups' in role:
raise MissingKey('backends_groups', role, self.role_file) raise MissingKey('backends_groups', role, self.role_file)

View File

@ -4,6 +4,9 @@
<th> <th>
Role Role
</th> </th>
<th class="sorter-false">
Description
</th>
<th class="sorter-false"> <th class="sorter-false">
Parent roles Parent roles
</th> </th>
@ -18,6 +21,9 @@
<td> <td>
${roles[role]['display_name']} ${roles[role]['display_name']}
</td> </td>
<td>
${roles[role]['description']}
</td>
<td> <td>
<% <%
sep = ', ' sep = ', '