Add link to sudo powers

This commit is contained in:
Eli Ribble 2026-02-18 07:35:51 +00:00
parent ec8b7b7db9
commit 9f20eda00d
No known key found for this signature in database
5 changed files with 20 additions and 1 deletions

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.7 KiB

View file

@ -143,6 +143,19 @@
<span class="menu-text ms-2">Help</span>
</a>
</li>
{{ if eq .Role "root" }}
<li>
<a
href="/sudo"
data-bs-toggle="tooltip"
data-bs-placement="right"
title="Sudo"
>
<div class="menu-icon">{{ template "god.svg" }}</div>
<span class="menu-text ms-2">Sudo</span>
</a>
</li>
{{ end }}
</ul>
</div>
{{ end }}

View file

@ -83,7 +83,10 @@
display: flex;
justify-content: center;
}
.sidebar-menu .menu-icon svg {
width: 1em;
height: 1em;
}
.sidebar-menu .menu-text {
transition: opacity 0.3s;
}

View file

@ -85,5 +85,6 @@ type User struct {
Initials string
Notifications []notification.Notification
Organization Organization
Role string
Username string
}

View file

@ -106,6 +106,7 @@ func contentForUser(ctx context.Context, user *models.User) (User, error) {
Initials: extractInitials(user.DisplayName),
Notifications: notifications,
Organization: organization,
Role: user.Role.String(),
Username: user.Username,
}, nil