2021-12-21 08:27:25 +00:00
|
|
|
{% extends "layout/default.html" %}
|
|
|
|
{% block title %}groups{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<table class="table table-hover align-middle">
|
|
|
|
<thead class="table-light">
|
|
|
|
<tr>
|
|
|
|
<th scope="col">group name</th>
|
|
|
|
<th scope="col">group description</th>
|
2021-12-21 10:12:34 +00:00
|
|
|
<th scope="col">member?</th>
|
2021-12-21 08:27:25 +00:00
|
|
|
<th scope="col">member count</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for group in groups|sort %}
|
2021-12-21 10:12:34 +00:00
|
|
|
{% if CURRENT_USER.entry_dn in group["member"] or USER_IS_ADMIN %}
|
2021-12-21 08:27:25 +00:00
|
|
|
<tr>
|
2021-12-21 10:12:34 +00:00
|
|
|
<th scope="row">
|
|
|
|
{% if USER_IS_ADMIN %}
|
|
|
|
<a href="{{ url_for("group_edit", ou=group["ou"]) }}">{{ group["ou"] }}</a>
|
|
|
|
{% else %}
|
|
|
|
{{ group["ou"] }}
|
|
|
|
{% endif %}
|
|
|
|
</th>
|
|
|
|
<td>{{ group["description"]|e }}</td>
|
|
|
|
{% if CURRENT_USER.entry_dn in group["member"] %}
|
|
|
|
<td>✅</td>
|
|
|
|
{% else %}
|
|
|
|
<td>❌</td>
|
|
|
|
{% endif %}
|
2021-12-21 08:27:25 +00:00
|
|
|
<td>{{ group["member"]|length }}</td>
|
|
|
|
</tr>
|
2021-12-21 10:12:34 +00:00
|
|
|
{% endif %}
|
2021-12-21 08:27:25 +00:00
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{% endblock %}
|