Remove change password button from sidebar if local auth is disabled
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -5,27 +5,27 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">User ID</th>
|
||||
<td>{{ u.uid.0 }}</td>
|
||||
<td>{{ _p.user.uid.0 }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">First name</th>
|
||||
<td>{{ u.first_name }}</td>
|
||||
<td>{{ _p.user.first_name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Last name</th>
|
||||
<td>{{ u.last_name }}</td>
|
||||
<td>{{ _p.user.last_name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Username</th>
|
||||
<td>{{ u.username }}</td>
|
||||
<td>{{ _p.user.username }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Email</th>
|
||||
<td>{{ u.email }}</td>
|
||||
<td>{{ _p.user.email }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Account type</th>
|
||||
<td>{% if u.admin %}Admin{% else %}Regular user{% endif %}</td>
|
||||
<td>{% if _p.user.admin %}Admin{% else %}Regular user{% endif %}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -14,7 +14,7 @@
|
||||
<a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto link-dark text-decoration-none">
|
||||
<span class="fs-4">{{ _p.app_name }}</span>
|
||||
</a>
|
||||
{% if _p.is_admin %}
|
||||
{% if _p.user.admin %}
|
||||
<span>Version {{ _p.version }}</span>
|
||||
{% endif %}
|
||||
<hr>
|
||||
@ -24,18 +24,20 @@
|
||||
Account details
|
||||
</a>
|
||||
</li>
|
||||
{% if _p.user.allow_local_login %}
|
||||
<li>
|
||||
<a href="/settings/change_password" class="nav-link link-dark">
|
||||
Change password
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a href="/settings/two_factors" class="nav-link link-dark">
|
||||
Two-factor authentication
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% if _p.is_admin %}
|
||||
{% if _p.user.admin %}
|
||||
<hr/>
|
||||
<li>
|
||||
<a href="/admin/clients" class="nav-link link-dark">
|
||||
@ -59,7 +61,7 @@
|
||||
<a href="#" class="d-flex align-items-center link-dark text-decoration-none dropdown-toggle" id="dropdownUser"
|
||||
data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<img src="/assets/img/account.png" alt="" width="32" height="32" class="rounded-circle me-2">
|
||||
<strong>{{ _p.user_name }}</strong>
|
||||
<strong>{{ _p.user.username }}</strong>
|
||||
</a>
|
||||
<ul class="dropdown-menu text-small shadow" aria-labelledby="dropdownUser">
|
||||
<li><a class="dropdown-item" href="/logout">Sign out</a></li>
|
||||
|
Reference in New Issue
Block a user