show which groups you are member in
This commit is contained in:
parent
1fd2c4e984
commit
72a8fb69fb
1 changed files with 16 additions and 6 deletions
|
@ -6,20 +6,30 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">group name</th>
|
<th scope="col">group name</th>
|
||||||
<th scope="col">group description</th>
|
<th scope="col">group description</th>
|
||||||
|
<th scope="col">member?</th>
|
||||||
<th scope="col">member count</th>
|
<th scope="col">member count</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for group in groups|sort %}
|
{% for group in groups|sort %}
|
||||||
|
{% if CURRENT_USER.entry_dn in group["member"] or USER_IS_ADMIN %}
|
||||||
<tr>
|
<tr>
|
||||||
{% if USER_IS_ADMIN %}
|
<th scope="row">
|
||||||
<th scope="row"><a href="{{ url_for("group_edit", ou=group["ou"]) }}">{{ group["ou"] }}</a></th>
|
{% if USER_IS_ADMIN %}
|
||||||
{% else %}
|
<a href="{{ url_for("group_edit", ou=group["ou"]) }}">{{ group["ou"] }}</a>
|
||||||
<th scope="row">{{ group["ou"] }}</th>
|
{% else %}
|
||||||
{% endif %}
|
{{ group["ou"] }}
|
||||||
<td>{{ group["description"] }}</td>
|
{% 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>
|
<td>{{ group["member"]|length }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Reference in a new issue