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>
|
||||
<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>
|
||||
|
|
Loading…
Reference in a new issue