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>
|
||||||
|
<th scope="row">
|
||||||
{% if USER_IS_ADMIN %}
|
{% if USER_IS_ADMIN %}
|
||||||
<th scope="row"><a href="{{ url_for("group_edit", ou=group["ou"]) }}">{{ group["ou"] }}</a></th>
|
<a href="{{ url_for("group_edit", ou=group["ou"]) }}">{{ group["ou"] }}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<th scope="row">{{ group["ou"] }}</th>
|
{{ group["ou"] }}
|
||||||
|
{% endif %}
|
||||||
|
</th>
|
||||||
|
<td>{{ group["description"]|e }}</td>
|
||||||
|
{% if CURRENT_USER.entry_dn in group["member"] %}
|
||||||
|
<td>✅</td>
|
||||||
|
{% else %}
|
||||||
|
<td>❌</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td>{{ group["description"] }}</td>
|
|
||||||
<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