feat(otter): show admin status in users view

main
Jef Roosens 2025-08-29 14:38:59 +02:00
parent 5017bd1c5f
commit 332c05491a
Signed by: Jef Roosens
GPG Key ID: 02D4C0997E74717B
2 changed files with 8 additions and 0 deletions

View File

@ -12,12 +12,18 @@
<table id="users">
<thead>
<th>Username</th>
<th>Privileges</th>
<th>Action</th>
</thead>
<tbody>
{%- for user in users %}
<tr>
<th>{{ user.username }}</th>
<th>{%- if user.admin -%}
Admin
{%- else -%}
User
{%- endif -%}
<th>
{%- if user.id != current_user_id -%}
<a hx-delete="/users/{{ user.id }}"

View File

@ -28,6 +28,7 @@ struct Session {
struct User {
id: i64,
username: String,
admin: bool,
}
impl Template for View {
@ -103,6 +104,7 @@ impl From<gpodder::User> for User {
Self {
id: value.id,
username: value.username,
admin: value.admin,
}
}
}