From 989057d66c43f21031e089bf6977b95234989fe9 Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Sun, 10 Mar 2019 11:45:35 +0000 Subject: [PATCH] Improve superuser display --- manager/models.py | 3 +++ templates/manager/adduser.html | 2 +- templates/manager/index.html | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/manager/models.py b/manager/models.py index 73d7f36..a877c3a 100644 --- a/manager/models.py +++ b/manager/models.py @@ -13,6 +13,9 @@ class Organization(models.Model): def __str__(self): return self.name + def orgausers(self): + return self.users.filter(is_superuser=False) + class Network(models.Model): name = models.CharField("Common Name", max_length=64, blank=True, null=True) extip = models.CharField("External/Public IP", max_length=15, unique=True) diff --git a/templates/manager/adduser.html b/templates/manager/adduser.html index aa082a7..b26e96d 100644 --- a/templates/manager/adduser.html +++ b/templates/manager/adduser.html @@ -26,7 +26,7 @@ diff --git a/templates/manager/index.html b/templates/manager/index.html index 4467ab1..aba11b2 100644 --- a/templates/manager/index.html +++ b/templates/manager/index.html @@ -91,7 +91,7 @@ {% userUsers as users %} {% for auser in users %} -
{% if auser.is_staff %}{% endif %}{{ auser.username }}{% if auser.is_staff %}{% endif %}
+
{% if auser.is_superuser %} {% endif %}{% if auser.is_staff %}{% endif %}{{ auser.username }}{% if auser.is_staff %}{% endif %}
{% if auser.is_staff %}{% endif %}{{ auser.first_name }} {{ auser.last_name }}{% if auser.is_staff %}{% endif %} {{ auser.userstatus.last_action }} {% if user.is_staff %} {% endif %}{% if auser.email %}{% endif %}{% if user.is_superuser %} {% endif %}