From 72a8fb69fb70583e439247ee49440bbe0b0ff517 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Tue, 21 Dec 2021 11:12:34 +0100 Subject: [PATCH] show which groups you are member in --- ldap_frontend/templates/groups/list.html | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/ldap_frontend/templates/groups/list.html b/ldap_frontend/templates/groups/list.html index 72557cf..4a7c37a 100644 --- a/ldap_frontend/templates/groups/list.html +++ b/ldap_frontend/templates/groups/list.html @@ -6,20 +6,30 @@ group name group description + member? member count {% for group in groups|sort %} +{% if CURRENT_USER.entry_dn in group["member"] or USER_IS_ADMIN %} -{% if USER_IS_ADMIN %} - {{ group["ou"] }} -{% else %} - {{ group["ou"] }} -{% endif %} - {{ group["description"] }} + +{% if USER_IS_ADMIN %} + {{ group["ou"] }} +{% else %} + {{ group["ou"] }} +{% endif %} + + {{ group["description"]|e }} +{% if CURRENT_USER.entry_dn in group["member"] %} + ✅ +{% else %} + ❌ +{% endif %} {{ group["member"]|length }} +{% endif %} {% endfor %}