From 3259c93bb7513e6121ed0dec03400ce57207e7d3 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 26 Feb 2024 11:03:07 +0100 Subject: [PATCH] add is admin to manual creation user --- idhub/templates/idhub/admin/user.html | 9 +++++++++ idhub_auth/forms.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/idhub/templates/idhub/admin/user.html b/idhub/templates/idhub/admin/user.html index fbb04d1..65be22d 100644 --- a/idhub/templates/idhub/admin/user.html +++ b/idhub/templates/idhub/admin/user.html @@ -43,6 +43,15 @@ {{ object.email }} + {% if object.is_admin %} +
+
+ {% trans "Is Admin" %} +
+
+
+
+ {% endif %} diff --git a/idhub_auth/forms.py b/idhub_auth/forms.py index d9ff2f7..a608cd1 100644 --- a/idhub_auth/forms.py +++ b/idhub_auth/forms.py @@ -11,7 +11,7 @@ class ProfileForm(forms.ModelForm): class Meta: model = User - fields = ['first_name', 'last_name', 'email'] + fields = ['first_name', 'last_name', 'email', 'is_admin'] def clean_first_name(self): first_name = super().clean()['first_name']