Skip to content

Commit 51cad68

Browse files
authored
feat(admin): make better use of screen real estate (#18397)
1 parent 1a78ba4 commit 51cad68

File tree

1 file changed

+12
-6
lines changed
  • warehouse/admin/templates/admin/users

1 file changed

+12
-6
lines changed

warehouse/admin/templates/admin/users/list.html

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@
4040
<th>Username</th>
4141
<th>Name</th>
4242
<th>Email</th>
43-
<th>Admin</th>
44-
<th>Moderator</th>
45-
<th>PSF Staff</th>
43+
<th>PyPI Roles</th>
4644
<th>Active</th>
4745
<th>2FA</th>
46+
<th>Frozen</th>
4847
</tr>
4948
</thead>
5049
<tbody>
@@ -56,11 +55,18 @@
5655
</td>
5756
<td>{{ user.name }}</td>
5857
<td>{{ user.email }}</td>
59-
<td>{% if user.is_superuser %}<i class="fa fa-check text-green"></i>{% endif %}</td>
60-
<td>{% if user.is_moderator %}<i class="fa fa-check text-green"></i>{% endif %}</td>
61-
<td>{% if user.is_psf_staff %}<i class="fa fa-check text-green"></i>{% endif %}</td>
58+
<td>
59+
{% set pypi_roles = [] %}
60+
{% if user.is_superuser %}{% set _ = pypi_roles.append("Admin") %}{% endif %}
61+
{% if user.is_moderator %}{% set _ = pypi_roles.append("Moderator") %}{% endif %}
62+
{% if user.is_psf_staff %}{% set _ = pypi_roles.append("PSF Staff") %}{% endif %}
63+
{% if user.is_observer %}{% set _ = pypi_roles.append("Observer") %}{% endif %}
64+
{% if user.is_support %}{% set _ = pypi_roles.append("Support") %}{% endif %}
65+
{{ pypi_roles|join(', ') }}
66+
</td>
6267
<td>{% if user.is_active %}<i class="fa fa-check text-green"></i>{% endif %}</td>
6368
<td>{% if user.has_two_factor %}<i class="fa fa-check text-green"></i>{% endif %}</td>
69+
<td>{% if user.is_frozen %}<i class="fa fa-check text-red"></i>{% endif %}</td>
6470
</tr>
6571
{% endfor %}
6672
</tbody>

0 commit comments

Comments
 (0)