show which groups you are member in

This commit is contained in:
Franzi 2021-12-21 11:12:34 +01:00
parent 1fd2c4e984
commit 72a8fb69fb
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -6,20 +6,30 @@
<tr>
<th scope="col">group name</th>
<th scope="col">group description</th>
<th scope="col">member?</th>
<th scope="col">member count</th>
</tr>
</thead>
<tbody>
{% for group in groups|sort %}
{% if CURRENT_USER.entry_dn in group["member"] or USER_IS_ADMIN %}
<tr>
{% if USER_IS_ADMIN %}
<th scope="row"><a href="{{ url_for("group_edit", ou=group["ou"]) }}">{{ group["ou"] }}</a></th>
{% else %}
<th scope="row">{{ group["ou"] }}</th>
{% endif %}
<td>{{ group["description"] }}</td>
<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 %}
<td>{{ group["member"]|length }}</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>