From f0299f1cea636554d9a9fda1e23700a26f35cd57 Mon Sep 17 00:00:00 2001 From: Lukas Vinclav Date: Mon, 7 Oct 2024 16:05:59 +0200 Subject: [PATCH] fix: guardian reverted group permissions display (#793) --- .../guardian/templates/unfold/guardian/group_form.html | 4 ++-- .../guardian/templates/unfold/guardian/user_form.html | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/unfold/contrib/guardian/templates/unfold/guardian/group_form.html b/src/unfold/contrib/guardian/templates/unfold/guardian/group_form.html index 51e4bfdf..0dfea187 100644 --- a/src/unfold/contrib/guardian/templates/unfold/guardian/group_form.html +++ b/src/unfold/contrib/guardian/templates/unfold/guardian/group_form.html @@ -39,9 +39,9 @@

{% if perm.codename in group_perms %} - {% include "unfold/helpers/boolean.html" with value=False %} - {% else %} {% include "unfold/helpers/boolean.html" with value=True %} + {% else %} + {% include "unfold/helpers/boolean.html" with value=False %} {% endif %} {% endfor %} diff --git a/src/unfold/contrib/guardian/templates/unfold/guardian/user_form.html b/src/unfold/contrib/guardian/templates/unfold/guardian/user_form.html index aacb567d..b0482cd6 100644 --- a/src/unfold/contrib/guardian/templates/unfold/guardian/user_form.html +++ b/src/unfold/contrib/guardian/templates/unfold/guardian/user_form.html @@ -38,10 +38,10 @@

- {% if perm.codename in group_perms %} - {% include "unfold/helpers/boolean.html" with value=False %} - {% else %} + {% if perm.codename in user_perms %} {% include "unfold/helpers/boolean.html" with value=True %} + {% else %} + {% include "unfold/helpers/boolean.html" with value=False %} {% endif %} {% endfor %}